<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="@bpmnkit/core" exporterVersion="0.0.23" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.9.0">
  <bpmn:error id="Error_OUT_OF_STOCK" name="OUT_OF_STOCK" errorCode="OUT_OF_STOCK"/>
  <bpmn:message id="Message_payment_received" name="payment-received">
    <bpmn:extensionElements>
      <zeebe:subscription correlationKey="=orderId"/>
    </bpmn:extensionElements>
  </bpmn:message>
  <bpmn:process id="order-to-cash" name="Order to Cash" isExecutable="true">
    <bpmn:extensionElements>
      <zeebe:versionTag value="1.0.0"/>
    </bpmn:extensionElements>
    <bpmn:startEvent id="order-received" name="Order received">
      <bpmn:outgoing>Flow_order-received_validate-order</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:serviceTask id="validate-order" name="Validate order">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="order-validate"/>
        <zeebe:ioMapping>
          <zeebe:output source="=valid" target="orderValid"/>
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_order-received_validate-order</bpmn:incoming>
      <bpmn:outgoing>Flow_validate-order_credit-decision</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:businessRuleTask id="credit-decision" name="Decide credit terms">
      <bpmn:extensionElements>
        <zeebe:calledDecision decisionId="credit-decision" resultVariable="credit"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_validate-order_credit-decision</bpmn:incoming>
      <bpmn:outgoing>Flow_credit-decision_credit-ok</bpmn:outgoing>
    </bpmn:businessRuleTask>
    <bpmn:exclusiveGateway id="credit-ok" name="Credit approved?" default="Flow_credit-ok_reserve-stock">
      <bpmn:incoming>Flow_credit-decision_credit-ok</bpmn:incoming>
      <bpmn:outgoing>Flow_credit-ok_notify-declined</bpmn:outgoing>
      <bpmn:outgoing>Flow_credit-ok_reserve-stock</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="notify-declined" name="Notify customer: declined">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="customer-notify"/>
        <zeebe:taskHeaders>
          <zeebe:header key="template" value="order-declined"/>
        </zeebe:taskHeaders>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_credit-ok_notify-declined</bpmn:incoming>
      <bpmn:outgoing>Flow_notify-declined_order-declined</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="order-declined" name="Order declined">
      <bpmn:incoming>Flow_notify-declined_order-declined</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:subProcess id="reserve-stock" name="Reserve stock">
      <bpmn:incoming>Flow_credit-ok_reserve-stock</bpmn:incoming>
      <bpmn:outgoing>Flow_reserve-stock_fulfil</bpmn:outgoing>
      <bpmn:startEvent id="reserve-start">
        <bpmn:outgoing>Flow_reserve-start_check-stock</bpmn:outgoing>
      </bpmn:startEvent>
      <bpmn:serviceTask id="check-stock" name="Check stock">
        <bpmn:extensionElements>
          <zeebe:taskDefinition type="inventory-check"/>
          <zeebe:ioMapping>
            <zeebe:output source="=available" target="stockAvailable"/>
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>Flow_reserve-start_check-stock</bpmn:incoming>
        <bpmn:outgoing>Flow_check-stock_in-stock</bpmn:outgoing>
      </bpmn:serviceTask>
      <bpmn:exclusiveGateway id="in-stock" name="In stock?" default="Flow_in-stock_out-of-stock">
        <bpmn:incoming>Flow_check-stock_in-stock</bpmn:incoming>
        <bpmn:outgoing>Flow_in-stock_reserve-items</bpmn:outgoing>
        <bpmn:outgoing>Flow_in-stock_out-of-stock</bpmn:outgoing>
      </bpmn:exclusiveGateway>
      <bpmn:serviceTask id="reserve-items" name="Reserve items">
        <bpmn:extensionElements>
          <zeebe:taskDefinition type="inventory-reserve"/>
          <zeebe:ioMapping>
            <zeebe:output source="=reservationId" target="reservationId"/>
          </zeebe:ioMapping>
        </bpmn:extensionElements>
        <bpmn:incoming>Flow_in-stock_reserve-items</bpmn:incoming>
        <bpmn:outgoing>Flow_reserve-items_reserved</bpmn:outgoing>
      </bpmn:serviceTask>
      <bpmn:endEvent id="reserved">
        <bpmn:incoming>Flow_reserve-items_reserved</bpmn:incoming>
      </bpmn:endEvent>
      <bpmn:endEvent id="out-of-stock">
        <bpmn:incoming>Flow_in-stock_out-of-stock</bpmn:incoming>
        <bpmn:errorEventDefinition errorRef="Error_OUT_OF_STOCK"/>
      </bpmn:endEvent>
      <bpmn:sequenceFlow id="Flow_reserve-start_check-stock" sourceRef="reserve-start" targetRef="check-stock"/>
      <bpmn:sequenceFlow id="Flow_check-stock_in-stock" sourceRef="check-stock" targetRef="in-stock"/>
      <bpmn:sequenceFlow id="Flow_in-stock_reserve-items" sourceRef="in-stock" targetRef="reserve-items" name="yes">
        <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=stockAvailable</bpmn:conditionExpression>
      </bpmn:sequenceFlow>
      <bpmn:sequenceFlow id="Flow_reserve-items_reserved" sourceRef="reserve-items" targetRef="reserved"/>
      <bpmn:sequenceFlow id="Flow_in-stock_out-of-stock" sourceRef="in-stock" targetRef="out-of-stock" name="no"/>
    </bpmn:subProcess>
    <bpmn:boundaryEvent id="on-out-of-stock" name="Out of stock" attachedToRef="reserve-stock">
      <bpmn:outgoing>Flow_on-out-of-stock_cancel-order</bpmn:outgoing>
      <bpmn:errorEventDefinition errorRef="Error_OUT_OF_STOCK"/>
    </bpmn:boundaryEvent>
    <bpmn:serviceTask id="cancel-order" name="Cancel order">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="order-cancel"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_on-out-of-stock_cancel-order</bpmn:incoming>
      <bpmn:outgoing>Flow_cancel-order_notify-out-of-stock</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="notify-out-of-stock" name="Notify customer: out of stock">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="customer-notify"/>
        <zeebe:taskHeaders>
          <zeebe:header key="template" value="order-out-of-stock"/>
        </zeebe:taskHeaders>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_cancel-order_notify-out-of-stock</bpmn:incoming>
      <bpmn:outgoing>Flow_notify-out-of-stock_order-cancelled</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="order-cancelled" name="Order cancelled">
      <bpmn:incoming>Flow_notify-out-of-stock_order-cancelled</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:parallelGateway id="fulfil">
      <bpmn:incoming>Flow_reserve-stock_fulfil</bpmn:incoming>
      <bpmn:outgoing>Flow_fulfil_create-invoice</bpmn:outgoing>
      <bpmn:outgoing>Flow_fulfil_ship-order</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:serviceTask id="create-invoice" name="Create invoice">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="invoice-create"/>
        <zeebe:ioMapping>
          <zeebe:output source="=invoiceId" target="invoiceId"/>
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_fulfil_create-invoice</bpmn:incoming>
      <bpmn:outgoing>Flow_create-invoice_fulfilled</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="ship-order" name="Ship order">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="shipment-create"/>
        <zeebe:ioMapping>
          <zeebe:output source="=trackingNumber" target="trackingNumber"/>
        </zeebe:ioMapping>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_fulfil_ship-order</bpmn:incoming>
      <bpmn:outgoing>Flow_ship-order_fulfilled</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:parallelGateway id="fulfilled">
      <bpmn:incoming>Flow_create-invoice_fulfilled</bpmn:incoming>
      <bpmn:incoming>Flow_ship-order_fulfilled</bpmn:incoming>
      <bpmn:outgoing>Flow_fulfilled_await-payment</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:receiveTask id="await-payment" name="Await payment" messageRef="Message_payment_received">
      <bpmn:incoming>Flow_fulfilled_await-payment</bpmn:incoming>
      <bpmn:outgoing>Flow_await-payment_close-order</bpmn:outgoing>
    </bpmn:receiveTask>
    <bpmn:serviceTask id="close-order" name="Close order">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="order-close"/>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_await-payment_close-order</bpmn:incoming>
      <bpmn:outgoing>Flow_close-order_order-closed</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="order-closed" name="Order closed">
      <bpmn:incoming>Flow_close-order_order-closed</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_order-received_validate-order" sourceRef="order-received" targetRef="validate-order"/>
    <bpmn:sequenceFlow id="Flow_validate-order_credit-decision" sourceRef="validate-order" targetRef="credit-decision"/>
    <bpmn:sequenceFlow id="Flow_credit-decision_credit-ok" sourceRef="credit-decision" targetRef="credit-ok"/>
    <bpmn:sequenceFlow id="Flow_credit-ok_notify-declined" sourceRef="credit-ok" targetRef="notify-declined" name="declined">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">=orderValid = false or credit.decision = "decline"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_notify-declined_order-declined" sourceRef="notify-declined" targetRef="order-declined"/>
    <bpmn:sequenceFlow id="Flow_credit-ok_reserve-stock" sourceRef="credit-ok" targetRef="reserve-stock" name="approved"/>
    <bpmn:sequenceFlow id="Flow_on-out-of-stock_cancel-order" sourceRef="on-out-of-stock" targetRef="cancel-order"/>
    <bpmn:sequenceFlow id="Flow_cancel-order_notify-out-of-stock" sourceRef="cancel-order" targetRef="notify-out-of-stock"/>
    <bpmn:sequenceFlow id="Flow_notify-out-of-stock_order-cancelled" sourceRef="notify-out-of-stock" targetRef="order-cancelled"/>
    <bpmn:sequenceFlow id="Flow_reserve-stock_fulfil" sourceRef="reserve-stock" targetRef="fulfil"/>
    <bpmn:sequenceFlow id="Flow_fulfil_create-invoice" sourceRef="fulfil" targetRef="create-invoice" name="invoice"/>
    <bpmn:sequenceFlow id="Flow_fulfil_ship-order" sourceRef="fulfil" targetRef="ship-order" name="ship"/>
    <bpmn:sequenceFlow id="Flow_create-invoice_fulfilled" sourceRef="create-invoice" targetRef="fulfilled"/>
    <bpmn:sequenceFlow id="Flow_ship-order_fulfilled" sourceRef="ship-order" targetRef="fulfilled"/>
    <bpmn:sequenceFlow id="Flow_fulfilled_await-payment" sourceRef="fulfilled" targetRef="await-payment"/>
    <bpmn:sequenceFlow id="Flow_await-payment_close-order" sourceRef="await-payment" targetRef="close-order"/>
    <bpmn:sequenceFlow id="Flow_close-order_order-closed" sourceRef="close-order" targetRef="order-closed"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="order-to-cash_di">
    <bpmndi:BPMNPlane id="order-to-cash_di_plane" bpmnElement="order-to-cash">
      <bpmndi:BPMNShape id="order-received_di" bpmnElement="order-received">
        <dc:Bounds x="51" y="186" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="20" y="226" width="98" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="validate-order_di" bpmnElement="validate-order">
        <dc:Bounds x="187" y="164" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="credit-decision_di" bpmnElement="credit-decision">
        <dc:Bounds x="387" y="164" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="credit-ok_di" bpmnElement="credit-ok">
        <dc:Bounds x="587" y="179" width="50" height="50"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="556" y="233" width="112" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="notify-declined_di" bpmnElement="notify-declined">
        <dc:Bounds x="1098" y="468" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="order-declined_di" bpmnElement="order-declined">
        <dc:Bounds x="1691" y="490" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1660" y="530" width="98" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reserve-stock_di" bpmnElement="reserve-stock" isExpanded="true">
        <dc:Bounds x="737" y="20" width="822" height="368"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="on-out-of-stock_di" bpmnElement="on-out-of-stock">
        <dc:Bounds x="1130" y="370" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1106" y="410" width="84" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="cancel-order_di" bpmnElement="cancel-order">
        <dc:Bounds x="1659" y="628" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="notify-out-of-stock_di" bpmnElement="notify-out-of-stock">
        <dc:Bounds x="1859" y="628" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="order-cancelled_di" bpmnElement="order-cancelled">
        <dc:Bounds x="2066" y="650" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2032" y="690" width="105" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="fulfil_di" bpmnElement="fulfil">
        <dc:Bounds x="1684" y="179" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="create-invoice_di" bpmnElement="create-invoice">
        <dc:Bounds x="1859" y="164" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ship-order_di" bpmnElement="ship-order">
        <dc:Bounds x="1859" y="468" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="fulfilled_di" bpmnElement="fulfilled">
        <dc:Bounds x="2059" y="179" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="await-payment_di" bpmnElement="await-payment">
        <dc:Bounds x="2209" y="164" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="close-order_di" bpmnElement="close-order">
        <dc:Bounds x="2409" y="164" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="order-closed_di" bpmnElement="order-closed">
        <dc:Bounds x="2609" y="186" width="36" height="36"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2585" y="226" width="84" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reserve-start_di" bpmnElement="reserve-start">
        <dc:Bounds x="787" y="120" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="check-stock_di" bpmnElement="check-stock">
        <dc:Bounds x="923" y="98" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="in-stock_di" bpmnElement="in-stock">
        <dc:Bounds x="1123" y="113" width="50" height="50"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1117" y="167" width="63" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reserve-items_di" bpmnElement="reserve-items">
        <dc:Bounds x="1273" y="258" width="100" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reserved_di" bpmnElement="reserved">
        <dc:Bounds x="1473" y="280" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="out-of-stock_di" bpmnElement="out-of-stock">
        <dc:Bounds x="1305" y="120" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_order-received_validate-order_di" bpmnElement="Flow_order-received_validate-order">
        <di:waypoint x="87" y="204"/>
        <di:waypoint x="187" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_validate-order_credit-decision_di" bpmnElement="Flow_validate-order_credit-decision">
        <di:waypoint x="287" y="204"/>
        <di:waypoint x="387" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_credit-decision_credit-ok_di" bpmnElement="Flow_credit-decision_credit-ok">
        <di:waypoint x="487" y="204"/>
        <di:waypoint x="587" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_credit-ok_notify-declined_di" bpmnElement="Flow_credit-ok_notify-declined">
        <di:waypoint x="612" y="229"/>
        <di:waypoint x="612" y="508"/>
        <di:waypoint x="1098" y="508"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="827" y="484" width="56" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_notify-declined_order-declined_di" bpmnElement="Flow_notify-declined_order-declined">
        <di:waypoint x="1198" y="508"/>
        <di:waypoint x="1691" y="508"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_credit-ok_reserve-stock_di" bpmnElement="Flow_credit-ok_reserve-stock">
        <di:waypoint x="637" y="204"/>
        <di:waypoint x="737" y="204"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="659" y="180" width="56" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_on-out-of-stock_cancel-order_di" bpmnElement="Flow_on-out-of-stock_cancel-order">
        <di:waypoint x="1148" y="406"/>
        <di:waypoint x="1148" y="426"/>
        <di:waypoint x="1609" y="426"/>
        <di:waypoint x="1609" y="668"/>
        <di:waypoint x="1659" y="668"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_cancel-order_notify-out-of-stock_di" bpmnElement="Flow_cancel-order_notify-out-of-stock">
        <di:waypoint x="1759" y="668"/>
        <di:waypoint x="1859" y="668"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_notify-out-of-stock_order-cancelled_di" bpmnElement="Flow_notify-out-of-stock_order-cancelled">
        <di:waypoint x="1959" y="668"/>
        <di:waypoint x="2066" y="668"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_reserve-stock_fulfil_di" bpmnElement="Flow_reserve-stock_fulfil">
        <di:waypoint x="1559" y="204"/>
        <di:waypoint x="1684" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_fulfil_create-invoice_di" bpmnElement="Flow_fulfil_create-invoice">
        <di:waypoint x="1734" y="204"/>
        <di:waypoint x="1859" y="204"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1772" y="180" width="49" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_fulfil_ship-order_di" bpmnElement="Flow_fulfil_ship-order">
        <di:waypoint x="1734" y="204"/>
        <di:waypoint x="1809" y="204"/>
        <di:waypoint x="1809" y="508"/>
        <di:waypoint x="1859" y="508"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1785" y="349" width="40" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_create-invoice_fulfilled_di" bpmnElement="Flow_create-invoice_fulfilled">
        <di:waypoint x="1959" y="204"/>
        <di:waypoint x="2059" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_ship-order_fulfilled_di" bpmnElement="Flow_ship-order_fulfilled">
        <di:waypoint x="1909" y="468"/>
        <di:waypoint x="1909" y="356"/>
        <di:waypoint x="2084" y="356"/>
        <di:waypoint x="2084" y="229"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_fulfilled_await-payment_di" bpmnElement="Flow_fulfilled_await-payment">
        <di:waypoint x="2109" y="204"/>
        <di:waypoint x="2209" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_await-payment_close-order_di" bpmnElement="Flow_await-payment_close-order">
        <di:waypoint x="2309" y="204"/>
        <di:waypoint x="2409" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_close-order_order-closed_di" bpmnElement="Flow_close-order_order-closed">
        <di:waypoint x="2509" y="204"/>
        <di:waypoint x="2609" y="204"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_reserve-start_check-stock_di" bpmnElement="Flow_reserve-start_check-stock">
        <di:waypoint x="823" y="138"/>
        <di:waypoint x="923" y="138"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_check-stock_in-stock_di" bpmnElement="Flow_check-stock_in-stock">
        <di:waypoint x="1023" y="138"/>
        <di:waypoint x="1123" y="138"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_in-stock_reserve-items_di" bpmnElement="Flow_in-stock_reserve-items">
        <di:waypoint x="1148" y="163"/>
        <di:waypoint x="1148" y="298"/>
        <di:waypoint x="1273" y="298"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1124" y="224" width="40" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_reserve-items_reserved_di" bpmnElement="Flow_reserve-items_reserved">
        <di:waypoint x="1373" y="298"/>
        <di:waypoint x="1473" y="298"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_in-stock_out-of-stock_di" bpmnElement="Flow_in-stock_out-of-stock">
        <di:waypoint x="1173" y="138"/>
        <di:waypoint x="1305" y="138"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1219" y="114" width="40" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

