<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0fqpje6" targetNamespace="http://bpmn.io/schema/bpmn" exporter="bpmn-js (https://demo.bpmn.io)" exporterVersion="7.2.0">
  <bpmn:message id="newInvoice" name="newInvoiceMessage" />
  <bpmn:signal id="cancelAll" name="cancelSignal" />
  <bpmn:message id="newInvoice2" name="newInvoiceMessage2" />
  <bpmn:signal id="cancelAll2" name="cancelSignal2" />
  <bpmn:collaboration id="Collaboration_0q44ppb">
    <bpmn:participant id="Participant_0zpon3h" processRef="Process_1so81jg" />
  </bpmn:collaboration>
  <bpmn:process id="Process_1so81jg" isExecutable="false">
    <bpmn:task id="service_task" name="Service Task">
      <bpmn:incoming>Flow_0xpjff0</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_1gfmf6g</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_0d7mfls</bpmn:incoming>
      <bpmn:outgoing>Flow_0s8ghrk</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics camunda:collection="$(this.data.records)" />
    </bpmn:task>
    <bpmn:task id="script_task" name="Script Task">
      <bpmn:incoming>Flow_18xinq3</bpmn:incoming>
      <bpmn:incoming>SequenceFlow_1o63npk</bpmn:incoming>
      <bpmn:outgoing>Flow_0xpjff0</bpmn:outgoing>
      <bpmn:multiInstanceLoopCharacteristics isSequential="true" camunda:collection="$(this.data.records)" />
    </bpmn:task>
    <bpmn:endEvent id="Event_0bf16wv">
      <bpmn:incoming>Flow_0s8ghrk</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:startEvent id="StartEvent_0tp966p" name="Msg Start">
      <bpmn:outgoing>SequenceFlow_1o63npk</bpmn:outgoing>
      <bpmn:messageEventDefinition id="messageEventDef1" messageRef="newInvoice" />
    </bpmn:startEvent>
    <bpmn:startEvent id="StartEvent_09y5m9i" name="signal">
      <bpmn:outgoing>SequenceFlow_0d7mfls</bpmn:outgoing>
      <bpmn:signalEventDefinition id="signalEventDef1"  signalRef="cancelAll" />
    </bpmn:startEvent>
    <bpmn:startEvent id="StartEvent_03f740y" name="timer">
      <bpmn:outgoing>SequenceFlow_1gfmf6g</bpmn:outgoing>
      <bpmn:timerEventDefinition id="TimerEventDefinition_07xu06a">
        <bpmn:timeDuration xsi:type="bpmn:tExpression">PT2S</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:startEvent>
    <bpmn:startEvent id="StartEvent_1ohx91b" name="User Start">
      <bpmn:outgoing>Flow_18xinq3</bpmn:outgoing>
      <bpmn:conditionalEventDefinition />
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_0xpjff0" sourceRef="script_task" targetRef="service_task" />
    <bpmn:sequenceFlow id="SequenceFlow_1gfmf6g" sourceRef="StartEvent_03f740y" targetRef="service_task" />
    <bpmn:sequenceFlow id="SequenceFlow_0d7mfls" sourceRef="StartEvent_09y5m9i" targetRef="service_task" />
    <bpmn:sequenceFlow id="Flow_0s8ghrk" sourceRef="service_task" targetRef="Event_0bf16wv" />
    <bpmn:sequenceFlow id="Flow_18xinq3" sourceRef="StartEvent_1ohx91b" targetRef="script_task" />
    <bpmn:sequenceFlow id="SequenceFlow_1o63npk" sourceRef="StartEvent_0tp966p" targetRef="script_task" />
    <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_0sb8frc">
      <bpmn:signalEventDefinition id="signalEventDef2" signalRef="cancelAll2" />
    </bpmn:intermediateCatchEvent>
    <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_1v01sfa">
      <bpmn:messageEventDefinition id="messageEventDef2"  messageRef="newInvoice2" />
    </bpmn:intermediateCatchEvent>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_0q44ppb">
      <bpmndi:BPMNShape id="Participant_0zpon3h_di" bpmnElement="Participant_0zpon3h" isHorizontal="true">
        <dc:Bounds x="139" y="34" width="501" height="208" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_18xinq3_di" bpmnElement="Flow_18xinq3">
        <di:waypoint xsi:type="dc:Point" x="222" y="74" />
        <di:waypoint xsi:type="dc:Point" x="246" y="74" />
        <di:waypoint xsi:type="dc:Point" x="246" y="98" />
        <di:waypoint xsi:type="dc:Point" x="269" y="98" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="216" y="76" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0xpjff0_di" bpmnElement="Flow_0xpjff0">
        <di:waypoint xsi:type="dc:Point" x="369" y="98" />
        <di:waypoint xsi:type="dc:Point" x="416" y="98" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="348" y="73" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0s8ghrk_di" bpmnElement="Flow_0s8ghrk">
        <di:waypoint xsi:type="dc:Point" x="516" y="98" />
        <di:waypoint xsi:type="dc:Point" x="536" y="98" />
        <di:waypoint xsi:type="dc:Point" x="536" y="98" />
        <di:waypoint xsi:type="dc:Point" x="557" y="98" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="506" y="88" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="script_task_di" bpmnElement="script_task">
        <dc:Bounds x="269" y="58" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="service_task_di" bpmnElement="service_task">
        <dc:Bounds x="416" y="58" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0bf16wv_di" bpmnElement="Event_0bf16wv">
        <dc:Bounds x="557" y="80" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="530" y="116" width="90" height="20" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SequenceFlow_1gfmf6g_di" bpmnElement="SequenceFlow_1gfmf6g">
        <di:waypoint xsi:type="dc:Point" x="528" y="185" />
        <di:waypoint xsi:type="dc:Point" x="466" y="185" />
        <di:waypoint xsi:type="dc:Point" x="466" y="138" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="452" y="164" width="90" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_1o63npk_di" bpmnElement="SequenceFlow_1o63npk">
        <di:waypoint xsi:type="dc:Point" x="222" y="143" />
        <di:waypoint xsi:type="dc:Point" x="246" y="143" />
        <di:waypoint xsi:type="dc:Point" x="246" y="98" />
        <di:waypoint xsi:type="dc:Point" x="269" y="98" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="216" y="114" width="90" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SequenceFlow_0d7mfls_di" bpmnElement="SequenceFlow_0d7mfls">
        <di:waypoint xsi:type="dc:Point" x="418" y="185" />
        <di:waypoint xsi:type="dc:Point" x="448" y="185" />
        <di:waypoint xsi:type="dc:Point" x="448" y="142" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="388" y="164" width="90" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="StartEvent_0cj97i2_di" bpmnElement="StartEvent_0tp966p">
        <dc:Bounds x="186" y="125" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="180" y="164" width="48" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_05bwbry_di" bpmnElement="StartEvent_09y5m9i">
        <dc:Bounds x="382" y="167" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="386" y="206" width="29" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_1gy9k4h_di" bpmnElement="StartEvent_03f740y">
        <dc:Bounds x="528" y="167" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="533" y="206" width="27" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_19ekmei_di" bpmnElement="StartEvent_1ohx91b">
        <dc:Bounds x="186" y="56" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="179" y="92" width="50" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="IntermediateCatchEvent_1w5bkz4_di" bpmnElement="IntermediateThrowEvent_0sb8frc">
        <dc:Bounds x="278" y="193" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="296" y="232" width="0" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="IntermediateCatchEvent_1b74yw3_di" bpmnElement="IntermediateThrowEvent_1v01sfa">
        <dc:Bounds x="214" y="193" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="232" y="232" width="0" height="13" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
