AnsweredAssumed Answered

I am using multi instance call activity. i am using an expression in collection to return order ids of items of a particular product. it runs fine and i see it finishing all the tasks within the call activity. but it fails to complete the call activity. i

Question asked by agnishu on Dec 27, 2018
Latest reply on Jan 2, 2019 by agnishu

i am using multi instance call activity and using expression in the collection. this returns ids of the orders from a particular item. and based on those ids its supposed to run call activity that many times. 

i tested with one item and all the tasks within the call activity ran for the one order. but when it finished the execution it tried to evaluate the expression again. this time it didnt find any variable that i have defined as input and output already.

 

<callActivity id="callactivity1" name="IP Allocation MLP" calledElement="MLP">
<extensionElements>
<activiti:in sourceExpression="P0364088" target="MLP_P_CODE"></activiti:in>
<activiti:in source="aibEnvironment" target="aibEnvironment"></activiti:in>
<activiti:in source="thisOrderPID" target="thisOrderPID"></activiti:in>
<activiti:out source="aibEnvironment" target="aibEnvironment"></activiti:out>
<activiti:out source="mop" target="mop"></activiti:out>
<activiti:executionListener event="start" class="com.bt.aib.activiti.process.listeners.ActivitiExecutionBoxContextListener"></activiti:executionListener>
<activiti:executionListener event="end" class="com.bt.aib.activiti.process.listeners.ActivitiExecutionUnboxContextListener"></activiti:executionListener>
</extensionElements>
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${mop.allOrderItemsPIDsFor(&quot;Generic CPE&quot;)}" activiti:elementVariable="thisOrderPID"></multiInstanceLoopCharacteristics>
</callActivity>

 

EndExecutionOperation Error while completing sub process of execution ProcessInstance[213123]
org.activiti.engine.ActivitiException: Error while evaluating expression: ${mop.allOrderItemsPIDsFor("Generic CPE")}

 

for the first 2 times the expression gave correct output but third time it failed to use the variable "mop"

can you please help?

Outcomes