We have a process which we are porting from Activiti to flowable 6.5.0. The process manages a set of so called delivery points and is implemented with multiple flows. The bundledrop.master flow is the outer most flow. It will call the flow bundledrop.dropEan for each managed deliverypoint. This works fine in activiti.
We ported the bundledrop.dropEan flow first and everything is working as expected (proved by scenario tests that run entire scenarios through the flow).
While porting bundledrop.master flow the first test we execute fails. It is a happy flow test with three different delivery points. After analyzing the cause we found that callActivity calls the bundledrop.dropEan flow indeed 3 times, but each time with the same value for the variable deliverypoint. We have 3 different values (EAN1, EAN2 and EAN3), but the drop flow always get called with EAN3.
I added debugging output to the call that retrieves list (dropBundle.getDropBundleDeliveryPoints()) and it shows the 3 different values are there.
I added a bogus parameter with the value of loopcounter from the fragment below, and it shows it is always 2 for each call (I would expect 0,1,2). So we think something is wrong with the xml fragment we use:
The fragment in the xml is as follows:
<callActivity id="startNeededMarketProcesses"
name="Start Needed Market Processes"
flowable:async="true"
calledElement="bundledrop.dropEan"
flowable:calledElementType="key"
flowable:fallbackToDefaultTenant="false">
<extensionElements>
<flowable:in
sourceExpression="${dropBundle.getDropBundleDeliveryPoints().get(loopCounter)}"
target="deliveryPoint">
</flowable:in>
</extensionElements>
<multiInstanceLoopCharacteristics
isSequential="false"
flowable:collection="${dropBundle.getDropBundleDeliveryPoints()}">
</multiInstanceLoopCharacteristics>
</callActivity>
Does anybody have an idea what we are doing wrong ?