cancel
Showing results for 
Search instead for 
Did you mean: 

Multiinstance subprocess erroring on boundary condition

ad1
Champ in-the-making
Champ in-the-making
I have  the following configuration to kick off multi-instance sub process.

1.Collection = ${execution.getVariable("PAYLOAD")} – this the Payload  variable  at the parent process level.
2. Completion condition = ${nrOfCompletedInstances/nrOfInstances > 0.95}


The Subprocess gets called the number of times as per the collection list, but on the boundary condition it errors out!
For eg: I have 3 items in the collection. The subprocess gets called for 3 times. On the 4th iteration it throws the following error. It should not even be going to the 4th iteration?


2016-05-16 15:39:35.041 ERROR 3747 — [cTaskExecutor-1] o.a.e.i.a.ExecuteAsyncRunnable           : Job 20 failed

org.activiti.engine.ActivitiIllegalArgumentException: ${execution.getVariable("PAYLOAD")}' didn't resolve to a Collection
   at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.resolveNrOfInstances(MultiInstanceActivityBehavior.java:137) ~[activiti-engine-5.19.0.2.jar:5.19.0.2]
   at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.execute(MultiInstanceActivityBehavior.java:97) ~[activiti-engine-5.19.0.2.jar:5.19.0.2]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60) ~[activiti-engine-5.19.0.2.jar:5.19.0.2]


2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
Without example process and code to show what you're doing, this is impossible to answer, I'm afraid.

ad1
Champ in-the-making
Champ in-the-making
Strange  that it happened only when I had set Collection and  completion condition. I removed both of them and just put in the  Loop Cardinality and everything is good now. It loops exactly the desired number of times