Passing variables to recursive call activities

20240521.181615-recursive-with-timer.bpmn (7.5 KB)

I am trying to pass variables across multiple recursive calls of the same call activity.

Camunda does instantiate separate processes, as I can see from the cockpit, but I find to no way to correctly pass the variable.

I have tried with scripts execution.setVariableLocal, execution.setVariable, with setting the values directly in the modeler, with all the combinations of “Asynchronous Continuation” flags, but I cannot make it work.

What I would expect, is that “level=0” makes a recursive call and on the child process I see “level==1”. The variable never seems to be present.

Any ideas?

Setting local="true" means that all local variables of the execution executing the call activity are mapped into the called process instance. These are exactly the variables that are declared as input parameters.

In addition to defining Inputs, you need to check both the Propagate all variables and Local checkboxes

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.