<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions
  xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
  targetNamespace="http://bpmn.io/schema/bpmn"
  id="Definitions_1" 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">
  <bpmn:collaboration id="Collaboration_1">
    <bpmn:participant id="Participant_1" name="Order Fulfillment" processRef="Process_1"/>
  </bpmn:collaboration>
  <bpmn:process id="Process_1" isExecutable="false">
    <bpmn:laneSet id="LaneSet_1">
      <bpmn:lane id="Lane_System" name="System">
        <bpmn:flowNodeRef>StartEvent_PaymentConfirmed</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_SendTrackingToCustomer</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Warehouse" name="Warehouse">
        <bpmn:flowNodeRef>Gateway_InStock</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ParallelGateway_SplitPreparation</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_ReserveStock</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ParallelGateway_JoinPreparation</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>UserTask_PickPackOrder</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Fulfilment" name="Fulfilment">
        <bpmn:flowNodeRef>Task_GenerateShippingLabel</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ServiceTask_DispatchWithCarrier</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_DeliveryConfirmed</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_BackOrder</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>

    <bpmn:startEvent id="StartEvent_PaymentConfirmed" name="Payment Confirmed">
      <bpmn:messageEventDefinition id="MsgDef_PaymentConfirmed"/>
    </bpmn:startEvent>
    
    <bpmn:exclusiveGateway id="Gateway_InStock" name="In stock?" gatewayDirection="Diverging"/>
    
    <bpmn:parallelGateway id="ParallelGateway_SplitPreparation" name="Preparation Split" gatewayDirection="Diverging"/>
    
    <bpmn:serviceTask id="Task_ReserveStock" name="Reserve Stock"/>
    
    <bpmn:serviceTask id="Task_GenerateShippingLabel" name="Generate Shipping Label"/>
    
    <bpmn:parallelGateway id="ParallelGateway_JoinPreparation" name="Preparation Join" gatewayDirection="Converging"/>
    
    <bpmn:userTask id="UserTask_PickPackOrder" name="Pick &amp; Pack Order"/>
    
    <bpmn:serviceTask id="ServiceTask_DispatchWithCarrier" name="Dispatch with Carrier"/>
    
    <bpmn:sendTask id="Task_SendTrackingToCustomer" name="Send Tracking to Customer"/>
    
    <bpmn:endEvent id="EndEvent_DeliveryConfirmed" name="Delivery Confirmed">
      <bpmn:messageEventDefinition id="MsgDef_DeliveryConfirmed"/>
    </bpmn:endEvent>
    
    <bpmn:endEvent id="EndEvent_BackOrder" name="Back-Order Triggered"/>
    
    <!-- Sequence Flows -->
    <bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_PaymentConfirmed" targetRef="Gateway_InStock"/>
    
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Gateway_InStock" targetRef="ParallelGateway_SplitPreparation" name="Yes"/>
    <bpmn:sequenceFlow id="Flow_3" sourceRef="Gateway_InStock" targetRef="EndEvent_BackOrder" name="No"/>
    
    <bpmn:sequenceFlow id="Flow_4" sourceRef="ParallelGateway_SplitPreparation" targetRef="Task_ReserveStock"/>
    <bpmn:sequenceFlow id="Flow_5" sourceRef="ParallelGateway_SplitPreparation" targetRef="Task_GenerateShippingLabel"/>
    
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Task_ReserveStock" targetRef="ParallelGateway_JoinPreparation"/>
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Task_GenerateShippingLabel" targetRef="ParallelGateway_JoinPreparation"/>
    
    <bpmn:sequenceFlow id="Flow_8" sourceRef="ParallelGateway_JoinPreparation" targetRef="UserTask_PickPackOrder"/>
    
    <bpmn:sequenceFlow id="Flow_9" sourceRef="UserTask_PickPackOrder" targetRef="ServiceTask_DispatchWithCarrier"/>
    
    <bpmn:sequenceFlow id="Flow_10" sourceRef="ServiceTask_DispatchWithCarrier" targetRef="Task_SendTrackingToCustomer"/>
    <bpmn:sequenceFlow id="Flow_11" sourceRef="Task_SendTrackingToCustomer" targetRef="EndEvent_DeliveryConfirmed"/>
    
  </bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
  <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1">
    <bpmndi:BPMNShape id="BPMNShape_Participant_1" bpmnElement="Participant_1" isHorizontal="true">
      <dc:Bounds x="0" y="0" width="1908" height="600"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Lane_System" bpmnElement="Lane_System" isHorizontal="true">
      <dc:Bounds x="30" y="0" width="1878" height="200"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Lane_Warehouse" bpmnElement="Lane_Warehouse" isHorizontal="true">
      <dc:Bounds x="30" y="200" width="1878" height="200"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Lane_Fulfilment" bpmnElement="Lane_Fulfilment" isHorizontal="true">
      <dc:Bounds x="30" y="400" width="1878" height="200"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Gateway_InStock" bpmnElement="Gateway_InStock">
      <dc:Bounds x="385" y="275" width="50" height="50"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_ParallelGateway_SplitPreparation" bpmnElement="ParallelGateway_SplitPreparation">
      <dc:Bounds x="585" y="275" width="50" height="50"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_ParallelGateway_JoinPreparation" bpmnElement="ParallelGateway_JoinPreparation">
      <dc:Bounds x="985" y="275" width="50" height="50"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_StartEvent_PaymentConfirmed" bpmnElement="StartEvent_PaymentConfirmed">
      <dc:Bounds x="192" y="82" width="36" height="36"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_DeliveryConfirmed" bpmnElement="EndEvent_DeliveryConfirmed">
      <dc:Bounds x="1792" y="482" width="36" height="36"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_BackOrder" bpmnElement="EndEvent_BackOrder">
      <dc:Bounds x="592" y="482" width="36" height="36"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_UserTask_PickPackOrder" bpmnElement="UserTask_PickPackOrder">
      <dc:Bounds x="1160" y="260" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_ReserveStock" bpmnElement="Task_ReserveStock">
      <dc:Bounds x="760" y="260" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_GenerateShippingLabel" bpmnElement="Task_GenerateShippingLabel">
      <dc:Bounds x="760" y="460" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_ServiceTask_DispatchWithCarrier" bpmnElement="ServiceTask_DispatchWithCarrier">
      <dc:Bounds x="1360" y="460" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_SendTrackingToCustomer" bpmnElement="Task_SendTrackingToCustomer">
      <dc:Bounds x="1560" y="60" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_1" bpmnElement="Flow_1">
      <di:waypoint x="210" y="118"/>
      <di:waypoint x="210" y="300"/>
      <di:waypoint x="385" y="300"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_2" bpmnElement="Flow_2">
      <di:waypoint x="435" y="300"/>
      <di:waypoint x="585" y="300"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_3" bpmnElement="Flow_3">
      <di:waypoint x="410" y="325"/>
      <di:waypoint x="410" y="500"/>
      <di:waypoint x="592" y="500"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_4" bpmnElement="Flow_4">
      <di:waypoint x="635" y="300"/>
      <di:waypoint x="760" y="300"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_5" bpmnElement="Flow_5">
      <di:waypoint x="610" y="325"/>
      <di:waypoint x="610" y="350"/>
      <di:waypoint x="710" y="350"/>
      <di:waypoint x="710" y="500"/>
      <di:waypoint x="760" y="500"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_6" bpmnElement="Flow_6">
      <di:waypoint x="860" y="300"/>
      <di:waypoint x="985" y="300"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_7" bpmnElement="Flow_7">
      <di:waypoint x="810" y="460"/>
      <di:waypoint x="810" y="435"/>
      <di:waypoint x="910" y="435"/>
      <di:waypoint x="910" y="300"/>
      <di:waypoint x="985" y="300"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_8" bpmnElement="Flow_8">
      <di:waypoint x="1035" y="300"/>
      <di:waypoint x="1160" y="300"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_9" bpmnElement="Flow_9">
      <di:waypoint x="1210" y="340"/>
      <di:waypoint x="1210" y="500"/>
      <di:waypoint x="1360" y="500"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_10" bpmnElement="Flow_10">
      <di:waypoint x="1410" y="460"/>
      <di:waypoint x="1410" y="100"/>
      <di:waypoint x="1560" y="100"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_11" bpmnElement="Flow_11">
      <di:waypoint x="1610" y="140"/>
      <di:waypoint x="1610" y="500"/>
      <di:waypoint x="1792" y="500"/>
    </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>