Search code examples
javascriptbpmncamundacamunda-modelerjuel

check if a variable is null or not, on sequence flows in camunda modeler


On a sequenceFlow, I want to check a condition which may include a variable that may not be defined yet in process instance. so if it's not defined, I dont want to get ActivitiException of "the variable is not defined", but want the flow to proceed.

I wrote my condition like this:

${ A == null || A.a >= B.b }

then when A is null (not defined yet) I cant proceed :/

what should I do?


Solution

  • It’s a workaround, but you could use an ExecutionListener and init the value when your process starts, so you’ll never have a Null value