A question about MultiInstance and Listener.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2014 05:49 AM
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.
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>
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 10:05 AM
The variables need to be available BEFORE the multi instance. The task is only created once the multi instance is already started.