12-27-2018 03:10 AM
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?
01-01-2019 10:13 PM
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.
01-02-2019 01:12 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.