AnsweredAssumed Answered

Multiinstance subprocess erroring on boundary condition

Question asked by ad1 on May 16, 2016
Latest reply on May 18, 2016 by ad1
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( ~[activiti-engine-]
   at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.execute( ~[activiti-engine-]
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute( ~[activiti-engine-]