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>
<activitiut source="aibEnvironment" target="aibEnvironment"></activitiut>
<activitiut source="mop" target="mop"></activitiut>
<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("Generic CPE"}" 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?
i am using a service task inside the call activity. this task is completed by leaving the execution by java. and there i am passing all the variables again.
i dont get any problem if i use script task or a service task where i complete the task in the delegate itself.
could it be that the task waits for the response and it nullifies the process variable of the super execution. if thats so how can i prevent it?
should i re-set the variables on the super execution at the start of the call activity.
PS: i get no problem if i use this call activity without multi-instance. but i must use multi instance as i dont know how many instances i might require to run.
The issue got resolved when i re-set the super execution variable at the end of the call activity.
its still puzzles me on why the super execution variable got null and why output parameter doesnt fill it up in case of multi instance call activity.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.