Hello, I am trying to use multi instance variable aggregation feature in BPMN diagrams but unfortunately with no success.
I have one bpmn diagram which has call activity configured as multi instance and this call activity execute another bpmn diagram which has one service task calling JavaDelegate implemented class. Inside this class variable is set by calling “execution.setVariable(“servicesToCreate”,“someValue”)” and this is done by multiple instances of that call activity. After all instances of call activity finished I try to read aggregated variable from parent bpmn diagram in service task but I receive ArrayNode with multiple JsonNode objects(count in the list depends on multi instance execution) but they are empty and I cannot find why I can’t get these values.
part from my bpmn xml:
<callActivity id=“processBatchesSequentially” name=“Process Resource Batches Sequentially” flowable:async=“true” calledElement=“processBatches” flowable:calledElementType=“key” flowable:inheritVariables=“true” flowable:completeAsync=“true” flowable:fallbackToDefaultTenant=“false”>
<multiInstanceLoopCharacteristics isSequential=“true” flowable:collection=“batchesToProcess” flowable:elementVariable=“batchToProcess”>
<extensionElements >
<flowable:variableAggregation target=“servicesToCreateAgg”>
<variable source=“servicesToCreate” ></variable>
</flowable:variableAggregation >
</extensionElements >
</multiInstanceLoopCharacteristics >
</callActivity >