How can I make a parallel multi-instance user task that allows the process to continue after the first completion, not waiting for all?

:small_blue_diamond: Goal:
As soon as any one instance completes with decision = true,
I want the next task to trigger, and keep the remaining tasks open (they can finish later).

<?xml version="1.0" encoding="UTF-8"?>

<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Web Modeler" exporterVersion="e452d58" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.7.0">

  <bpmn:process id="Process_1x49hui" name="kyctest" isExecutable="true">

    <bpmn:startEvent id="StartEvent_1">

      <bpmn:outgoing>Flow_01cewxt</bpmn:outgoing>

    </bpmn:startEvent>

    <bpmn:sequenceFlow id="Flow_01cewxt" sourceRef="StartEvent_1" targetRef="Activity_0degvic" />

    <bpmn:sequenceFlow id="Flow_07a1pxg" sourceRef="Activity_0degvic" targetRef="Activity_1fs412i" />

    <bpmn:scriptTask id="Activity_0degvic">

      <bpmn:extensionElements>

        <zeebe:script expression="=\[{name:&#34;hareesh&#34;,fullName:&#34;hareeshkumar&#34;},{name:&#34;hareeshkkkk&#34;,fullName:&#34;hareeshkumar&#34;},{name:&#34;kumarrrrr&#34;,fullName:&#34;hareeshkumarKumar&#34;}\]" resultVariable="demodata" />

      </bpmn:extensionElements>

      <bpmn:incoming>Flow_01cewxt</bpmn:incoming>

      <bpmn:outgoing>Flow_07a1pxg</bpmn:outgoing>

    </bpmn:scriptTask>

    <bpmn:userTask id="Activity_1fs412i">

      <bpmn:extensionElements>

        <zeebe:userTask />

        <zeebe:formDefinition formId="Form_16iylym" />

        <zeebe:ioMapping>

          <zeebe:input source="=entry.name" target="NameData" />

          <zeebe:input source="=entry.fullName" target="FullNameData" />

          <zeebe:output source="=decision" target="finalDecision" />

        </zeebe:ioMapping>

      </bpmn:extensionElements>

      <bpmn:incoming>Flow_07a1pxg</bpmn:incoming>

      <bpmn:outgoing>Flow_05g2bix</bpmn:outgoing>

      <bpmn:multiInstanceLoopCharacteristics>

        <bpmn:extensionElements>

          <zeebe:loopCharacteristics inputCollection="=demodata" inputElement="entry" />

        </bpmn:extensionElements>

        <bpmn:completionCondition xsi:type="bpmn:tFormalExpression">=decision = "true"</bpmn:completionCondition>

      </bpmn:multiInstanceLoopCharacteristics>

    </bpmn:userTask>

    <bpmn:exclusiveGateway id="Gateway_0yg5muj">

      <bpmn:incoming>Flow_05g2bix</bpmn:incoming>

      <bpmn:outgoing>Flow_0bjn9fz</bpmn:outgoing>

      <bpmn:outgoing>Flow_0nllx0l</bpmn:outgoing>

    </bpmn:exclusiveGateway>

    <bpmn:sequenceFlow id="Flow_0bjn9fz" sourceRef="Gateway_0yg5muj" targetRef="Activity_0q9tpqs">

      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=finalDecision = "true"</bpmn:conditionExpression>

    </bpmn:sequenceFlow>

    <bpmn:sequenceFlow id="Flow_0nllx0l" sourceRef="Gateway_0yg5muj" targetRef="Activity_1846kt0">

      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=finalDecision != "true"</bpmn:conditionExpression>

    </bpmn:sequenceFlow>

    <bpmn:endEvent id="Event_1rrgwzh">

      <bpmn:incoming>Flow_1dm8nf4</bpmn:incoming>

      <bpmn:incoming>Flow_1t17t6f</bpmn:incoming>

    </bpmn:endEvent>

    <bpmn:sequenceFlow id="Flow_1dm8nf4" sourceRef="Activity_0q9tpqs" targetRef="Event_1rrgwzh" />

    <bpmn:sequenceFlow id="Flow_1t17t6f" sourceRef="Activity_1846kt0" targetRef="Event_1rrgwzh" />

    <bpmn:userTask id="Activity_0q9tpqs" name="C00">

      <bpmn:extensionElements>

        <zeebe:userTask />

      </bpmn:extensionElements>

      <bpmn:incoming>Flow_0bjn9fz</bpmn:incoming>

      <bpmn:outgoing>Flow_1dm8nf4</bpmn:outgoing>

    </bpmn:userTask>

    <bpmn:userTask id="Activity_1846kt0" name="Test">

      <bpmn:extensionElements>

        <zeebe:userTask />

      </bpmn:extensionElements>

      <bpmn:incoming>Flow_0nllx0l</bpmn:incoming>

      <bpmn:outgoing>Flow_1t17t6f</bpmn:outgoing>

    </bpmn:userTask>

    <bpmn:sequenceFlow id="Flow_05g2bix" sourceRef="Activity_1fs412i" targetRef="Gateway_0yg5muj" />

  </bpmn:process>

  <bpmndi:BPMNDiagram id="BPMNDiagram_1">

    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1x49hui">

      <bpmndi:BPMNShape id="\_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">

        <dc:Bounds x="150" y="122" width="36" height="36" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Activity_15agj9j_di" bpmnElement="Activity_0degvic">

        <dc:Bounds x="240" y="100" width="100" height="80" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Activity_1mo10v7_di" bpmnElement="Activity_1fs412i">

        <dc:Bounds x="360" y="100" width="100" height="80" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Gateway_0yg5muj_di" bpmnElement="Gateway_0yg5muj" isMarkerVisible="true">

        <dc:Bounds x="615" y="115" width="50" height="50" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Event_1rrgwzh_di" bpmnElement="Event_1rrgwzh">

        <dc:Bounds x="882" y="132" width="36" height="36" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Activity_09wlmu8_di" bpmnElement="Activity_0q9tpqs">

        <dc:Bounds x="680" y="10" width="100" height="80" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Activity_1y192xw_di" bpmnElement="Activity_1846kt0">

        <dc:Bounds x="680" y="210" width="100" height="80" />

      </bpmndi:BPMNShape>

      <bpmndi:BPMNEdge id="Flow_01cewxt_di" bpmnElement="Flow_01cewxt">

        <di:waypoint x="186" y="140" />

        <di:waypoint x="240" y="140" />

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="Flow_07a1pxg_di" bpmnElement="Flow_07a1pxg">

        <di:waypoint x="340" y="140" />

        <di:waypoint x="360" y="140" />

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="Flow_0bjn9fz_di" bpmnElement="Flow_0bjn9fz">

        <di:waypoint x="640" y="115" />

        <di:waypoint x="640" y="50" />

        <di:waypoint x="680" y="50" />

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="Flow_0nllx0l_di" bpmnElement="Flow_0nllx0l">

        <di:waypoint x="640" y="165" />

        <di:waypoint x="640" y="250" />

        <di:waypoint x="680" y="250" />

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="Flow_1dm8nf4_di" bpmnElement="Flow_1dm8nf4">

        <di:waypoint x="780" y="50" />

        <di:waypoint x="831" y="50" />

        <di:waypoint x="831" y="150" />

        <di:waypoint x="882" y="150" />

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="Flow_1t17t6f_di" bpmnElement="Flow_1t17t6f">

        <di:waypoint x="780" y="250" />

        <di:waypoint x="831" y="250" />

        <di:waypoint x="831" y="150" />

        <di:waypoint x="882" y="150" />

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge id="Flow_05g2bix_di" bpmnElement="Flow_05g2bix">

        <di:waypoint x="460" y="140" />

        <di:waypoint x="615" y="140" />

      </bpmndi:BPMNEdge>

    </bpmndi:BPMNPlane>

  </bpmndi:BPMNDiagram>

</bpmn:definitions>

Thanks in advanc

Check the Completion Condition to see if it fits your requirements.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.