Multi-user-approval

hi all,i’m biggner in camunda modeler, and i want to model multi parallel approvers on camunda .I’m modeled it but when i deploy that
multi-user-approval.bpmn (4.9 KB)

@Forough, are you getting exception? can you provide the exception stack trace?

@Forough, In the userTask, the Collection variable should be expression like below. Refer the screenshot and attached bpmn.

${assigneeList}

Deploy this bpmn file: multi-user-approval.bpmn (4.7 KB)


BPMN xml for usertask should look like this:

<bpmn:userTask id="Approveniceideatt" name="Approve nice ideat990" camunda:asyncBefore="true" camunda:assignee="${assignee}">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>SequenceFlow_1llmycg</bpmn:incoming>
      <bpmn:outgoing>SequenceFlow_0tvak4s</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics camunda:collection="${assigneeList}" camunda:elementVariable="assignee" />
    </bpmn:userTask>
1 Like

hi, i run your file but i got this error.


and my new file is:
multi-user-approval_1.bpmn (4.7 KB)

@Forough, in the service task before setting into the variable , you need to serialize the list.

I apologize.how can serialize it .can you help me

@Forough, you need to obtain the instance of the java.util.ArrayList. Read more about Using Java Arrays with javascript.

var ArrayList = Java.type("java.util.ArrayList");
var assigneeList= new ArrayList;
assigneeList.add("galelio");
assigneeList.add("hawking");

execution.setVariable("assigneeList", assigneeList);

Deploy this bpmn file: multi-user-approval.bpmn (4.8 KB)

I was able to run successfully:

Thanks my friend