AnsweredAssumed Answered

multiInstanceLoopCharacteristics with an empty list

Question asked by harry1 on May 19, 2011
Latest reply on Jun 23, 2015 by martin.grofcik

I'm using a multiInstanceLoopCharacteristics with a List in my Activiti process. It works fine, except when the list is empty (the list is not null, it's just empty).
When the list is empty I have this error :

19 mai 2011 16:42:14 org.activiti.engine.impl.interceptor.CommandContext close
GRAVE: Error while closing command context
org.activiti.engine.ActivitiException: Invalid number of instances: must be positive integer value, but was 0
at org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior.createInstances(
at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.execute(
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(

I think it should work when there is no instance in the list (and just skip the loop), shouldn't it ?