AnsweredAssumed Answered

multiInstanceLoopCharacteristics with an empty list

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

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(ParallelMultiInstanceBehavior.java:42)
at org.activiti.engine.impl.bpmn.behavior.MultiInstanceActivityBehavior.execute(MultiInstanceActivityBehavior.java:82)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)


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

Regards,

Outcomes