Are typed variables unwrapped when mentioned in EL expressions?

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.

what is the score variable? a integer?

example:

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.

It is of type IntegerValue https://github.com/camunda/camunda-commons/blob/master/typed-values/src/main/java/org/camunda/bpm/engine/variable/value/IntegerValue.java

Sorry, I was trying to use terminology as described in the link below , the “Typed Values”:

https://docs.camunda.org/manual/7.8/user-guide/process-engine/variables/#typed-value-api

@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:

 IntegerValue typedValue = Variables.integerValue(100);
 runtimeService.setVariable(execution.getId(), "intVariable", typedValue);