1
votes

Is there a way to do something like ${refire + 1} at an exclusive gateway on execution listener. I need it to count how many times it loops. Image should describe: enter image description here

1

1 Answers

4
votes

You can use a expression on a start listener which increments your count variable.

execution.setVariable("variable",((Integer) execution.getVariable("variable"))+ 1);

Start execution listener would look like this:

<bpmn:extensionElements>
  <camunda:executionListener 
    expression="${execution.setVariable(&#34;variable&#34;,((Integer) execution.getVariable(&#34;variable&#34;))+ 1)}" 
    event="start" />
</bpmn:extensionElements>