How to check using expression if process variable is exist in camunda workflow?

5.7k Views Asked by At

I want to check at exclusive gateway if processInstance exist.I can check if the value of processInstance is set to null or not.

2

There are 2 best solutions below

0
On BEST ANSWER

I found a way to check in expression like below

${execution.getVariable('xyz') == null}

execution.getVariable() method works both in service task and expression as well.

4
On

Use a service task before the gateway that executes a process instance query and stores the result in a process variable, then, in the gateway, just check that variable (true/false).