Lets say I have a multi instance subprocess:
<subProcess id="random_subprocess" name="Random subProcess">
<multiInstanceLoopCharacteristics isSequential="false" flowable:collection="${initialize.getRandomList(execution)}" flowable:elementVariable="randomElement"></multiInstancethisLoopCharacteristics>
...
...
...
</subProcess>
While debugging, I notice that this function initialize.getRandomList(execution) is executed (n+1) times where n is the size of the list returned by this function. It returns the same list (size n) on each re-execution.
Ideally, the function should have been called only once. I may be missing out something here. I am looking out if anyone can help me fix this. I am not in favour of pre-computing the function value and storing it as a process/task variable.