cancel
Showing results for 
Search instead for 
Did you mean: 

Error on Multiinstance with 0 iterations

lucas_matw
Champ in-the-making
Champ in-the-making
Hi!

I'm having some problems with multiinstace sub-process/task when it collection is empty and "isSequential" is false.

I have isolated the case with this:


  <process id="myProcess" name="My process" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="userTask" name="userTask" activiti:assignee="user"></userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow5" sourceRef="userTask" targetRef="endevent1"></sequenceFlow>
    <userTask id="multiInstanceTask" name="multiInstanceTask">
      <multiInstanceLoopCharacteristics isSequential="false">
        <loopCardinality>0</loopCardinality>
      </multiInstanceLoopCharacteristics>
    </userTask>
    <sequenceFlow id="flow6" sourceRef="startevent1" targetRef="multiInstanceTask"></sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="multiInstanceTask" targetRef="userTask"></sequenceFlow>
  </process>


It throws this exception when you try to start a process:


org.activiti.engine.impl.pvm.PvmException: already taking a transition
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:445)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.takeAll(ExecutionEntity.java:549)
   at org.activiti.engine.impl.bpmn.behavior.ParallelMultiInstanceBehavior.leave(ParallelMultiInstanceBehavior.java:151)



But It works fine when "isSequential" is true, why?

Thanks!



4 REPLIES 4

trademak
Star Contributor
Star Contributor
Hi,

Thanks for reporting this. I think it's a bug, I'll look into it tomorrow and come back with a final answer after doing some debugging.

Best regards,

lucas_matw
Champ in-the-making
Champ in-the-making
Hello trademak,

Just to add more information. When I came to this error was on a multiiinstance sub-process with 0 iterations.
There is an important difference depending on which Activiti version is used,
5.17 = throws NullPointerException
5.18 = no exceptions, but the new Task is not created

Thanks for your answer.

trademak
Star Contributor
Star Contributor
Thanks, I've made some fixes that should resolve the issue.
Could you check against the current Github master if it resolves your issue?

Thanks,

lucas_matw
Champ in-the-making
Champ in-the-making
Hi!

I've just ran some tests with that version and it seems to work well Smiley Happy

Thanks!

Lucas