Hello
I am facing a problem implementing multi instance of a task in my workflow, using Camunda.
In the above picture we have a Service task name process line item. where we identify how many no of parallel task must be created.
Next we configure parallel multi instance user task as -
<bpmn2:userTask id="UserTask_16" camunda:formKey="app/lineItemTicketDetails.jsf" name="Line Item Task">
<bpmn2:extensionElements>
<camunda:taskListener class="com.portal.ticket.listener.WorkerLineItemCreateAssignmentListener" event="create"/>
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_32</bpmn2:incoming>
<bpmn2:incoming>SequenceFlow_11</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_29</bpmn2:outgoing>
<bpmn2:multiInstanceLoopCharacteristics camunda:collection="${lineItemsController.getLIneItemDtoForUserTasksVariable()}" camunda:elementVariable="lineItemProcessVariable"/>
</bpmn2:userTask>
Now we send a list of Object to this task according to list size it create user task and bind this object to this task.Then call a listener in create event where we provide all necessary details of this task as assignee,details of task etc.
here listener code is -
LineItemDTO lineItemDtoObject=(LineItemDTO) delegateTask.getVariable(PortalConstant.LINE_ITEM_PROCESS_VARIABLE);
if(null!=lineItemDtoObject){
delegateTask.setName("Line Item "+lineItemDtoObject.getLineItemId());
delegateTask.setDescription(lineItemDtoObject.getComment());
delegateTask.setOwner(lineItemDtoObject.getCreatedById());
}
Now we get this task in my task list.that's working perfectly.
Now we have N number of user task, among of them one of the task may go to next user task name as Cordinator/Super-Cordinator Task by exclusive gateway setting some conditional value. So he must complete this previous task name Line Item task, after completion of this task next level task are created . The next level task have some assignment listener as same as the previous one.
Otherwise he may go to next service task , but he have to wait until all task are not complete in previous Line Item task.
So my question is -
1) How to communicate in between two user task as they are parallel multi instance task and we need some business logic to pass some data from one task to another task.
2) what is the value of loop carnality of second Cordinator/Super-Cordinator Task and also how to bind object in them. Basically how to relate in between one Line Item task to Cordinator/Super-Cordinator Task.
3) As it is multi instance task so until unless all tasks are not completed it wont go to next Cordinator/Super-Cordinator Task , so in this case in which meaner flow are executed.
Please help me in this scenario. Give some example of parallel user task .