Are typed variables unwrapped when mentioned in EL expressions?
I guess the answer is “no, they aren’t, the user has to add .getValue() at all times if they work with typed variables”, but I need to doublecheck with you guys as I am new to Camunda and Camunda docs.
They have to write, say, ${score.getValue() > 100}, ${!empty order && !empty order.getValue()} etc in their, say, flow conditions… and this will be mandatory with the upcoming transient variables as they’re all typed.
say your variable is a type: integer and name is myVar and value is 100.
Your expression for a gateway sequence flow might be: ${myVar >= 100} which would evaluate to true whenmyVar` is 100 or greater.
if you are seeing otherwise, can you provide a bpmn example.
@fedd can you provide a example bpmn of your problem? The example expression i provided above functions as expected.
If you generated a variable such as: execution.setVariable('myNumVar', 100) it would generate a integer variable, and you can access that variable in a expression with something like ${myNumVar ==100} would return true.
Thanks and sorry, I am away from my development environment, do can’t provide an example for a couple of days… But the variable will be generated as in that article, something like this: