Multiinstance subprocess erroring on boundary condition

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2016 03:48 PM
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?
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 failedorg.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]
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 12:42 PM
Without example process and code to show what you're doing, this is impossible to answer, I'm afraid.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2016 12:50 PM
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
