AnsweredAssumed Answered

A question about MultiInstance and Listener.

Question asked by impulsehu on Jun 20, 2014
Latest reply on Jun 27, 2014 by jbarrez
According to the following bpmn code, I create a usertask node, and add a create event listener and a multiinstanceloop element.
In BPMN2.0 , we all know that we need prepare some necessary params before create usertask at a multiinstanceloop task. Like demo code, we must prepare "vote1_ParticipatorCollection" and " vote1_ManualRate" params. So, i add a create event listener "xxx.UserTaskCreateListener" for this usertask. In this listener, i set params for the delegateTask of listener , but when i start a processinstance for this processdefinition, i receive a exception message for some var is not found.

Can someone explain to me for this exception and my code, thx.

<userTask id="vote1" name="vote1" activiti:assignee="${participator}">
   <extensionElements>
      <activiti:taskListener event="create" class="xxx.UserTaskCreateListener">
         <activiti:field name="interceptorStack">
            <activiti:string>MultiInst</activiti:string>
         </activiti:field>
      </activiti:taskListener>
   </extensionElements>
   <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="vote1_ParticipatorCollection" activiti:elementVariable="participator" >
      <completionCondition>${nrOfCompletedInstances/nrOfInstances >= vote1_ManualRate}</completionCondition>
   </multiInstanceLoopCharacteristics>
</userTask>

Outcomes