How to use FEEL expression in input mapping of service task

In Camunda 7, JUEL expression could be used in input variable of BPMN elements, say service task here to have dynamic value.

For my use case I have a input variable of map entry type in service task within which I have a key whose value is calculated based on some configuration. It may be method invocation or some ternary conditional expression using JUEL expression.

How to achieve the same in Camunda 8.

Already referred FEEL documentation and I am aware of JUEL not being supported of Camunda 8.

Hi @Jason7 - can you share the JUEL expression perhaps?

Hey @nathan.loding,

Here are some samples that I have.

Method invocation sample : ${orderStatus.evaluate(execution, "key")}
Accessing process variable sample : ${order.duration}, here order can be assumed as a process variable.
Ternary condition : ${order.type == 'value' ? 100 : 200 }.

These are the kind of JUEL expression we have in the map entry input variable of a service or user task.

I am aware of execution special variable not being supported in C8

I don’t have an example for the “method invocation sample” because it depends a lot on how you’ve structured your process data and what you need to evaluate.

The second example is the same in FEEL, without the braces (assuming you have a process variable named order with a property named duration of course): order.duration

Ternary operators aren’t supported in FEEL, but you do have if/then statements: if order.type = "value" then 100 else 200 (demo in FEEL playground)

Hey @nathan.loding,

Thanks for the response.

For the method invocation scenario the setup we have is we are using execution to get the some process variable from DelegateExecution and key is used to fetch variable from Spring Cloud Config server.

Hi @Jason7 - that is something you cannot do with FEEL. If you need to fetch a variable from an external service, it’s probably best to utilize a service task to fetch the details needed.