<?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" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:process id="Proc_Order" isExecutable="false">
    <bpmn:startEvent id="Start_Order" name="Order Received" />
    <bpmn:task id="Task_Validate" name="Validate Order Data" />
    <bpmn:parallelGateway id="Split_Parallel" name="Split Checks" />
    <bpmn:task id="Task_Auth_Payment" name="Authorize Payment" />
    <bpmn:exclusiveGateway id="Gateway_Payment" name="Payment OK?" />
    <bpmn:task id="Task_Payment_Failed" name="Notify Payment Failed" />
    <bpmn:endEvent id="End_Order_Cancelled" name="Order Cancelled" />
    <bpmn:exclusiveGateway id="Gateway_Stock_Merge" name="Stock Evaluation" />
    <bpmn:task id="Task_Check_Stock" name="Check Inventory" />
    <bpmn:exclusiveGateway id="Gateway_Stock" name="In Stock?" />
    <bpmn:task id="Task_Backorder" name="Request Backorder" />
    <bpmn:task id="Task_Reserve_Stock" name="Reserve Items" />
    <bpmn:parallelGateway id="Join_Parallel" name="Sync Checks" />
    <bpmn:subProcess id="Sub_Fulfillment" name="Fulfillment &#38; Packing">
      <bpmn:startEvent id="Sub_Start" name="Fulfillment&#10;Start" />
      <bpmn:task id="Sub_Pick" name="Pick Items from Warehouse" />
      <bpmn:task id="Sub_Pack" name="Package Goods" />
      <bpmn:task id="Sub_Label" name="Print Shipping Label" />
      <bpmn:endEvent id="Sub_End" name="Ready&#10;to&#10;Ship" />
      <bpmn:sequenceFlow id="SF1" sourceRef="Sub_Start" targetRef="Sub_Pick" />
      <bpmn:sequenceFlow id="SF2" sourceRef="Sub_Pick" targetRef="Sub_Pack" />
      <bpmn:sequenceFlow id="SF3" sourceRef="Sub_Pack" targetRef="Sub_Label" />
      <bpmn:sequenceFlow id="SF4" sourceRef="Sub_Label" targetRef="Sub_End" />
    </bpmn:subProcess>
    <bpmn:task id="Task_Update_ERP" name="Update ERP &#38; Tracking" />
    <bpmn:task id="Task_Notify_Customer" name="Send Shipment Notice" />
    <bpmn:endEvent id="End_Order_Fulfilled" name="Order Delivered" />
    <bpmn:sequenceFlow id="F1" sourceRef="Start_Order" targetRef="Task_Validate" />
    <bpmn:sequenceFlow id="F2" sourceRef="Task_Validate" targetRef="Split_Parallel" />
    <bpmn:sequenceFlow id="F_Pay_1" sourceRef="Split_Parallel" targetRef="Task_Auth_Payment" />
    <bpmn:sequenceFlow id="F_Pay_2" sourceRef="Task_Auth_Payment" targetRef="Gateway_Payment" />
    <bpmn:sequenceFlow id="F_Pay_Fail" sourceRef="Gateway_Payment" targetRef="Task_Payment_Failed" />
    <bpmn:sequenceFlow id="F_Pay_Cancel" sourceRef="Task_Payment_Failed" targetRef="End_Order_Cancelled" />
    <bpmn:sequenceFlow id="F_Pay_OK" sourceRef="Gateway_Payment" targetRef="Join_Parallel" />
    <bpmn:sequenceFlow id="F_Stock_1" sourceRef="Split_Parallel" targetRef="Gateway_Stock_Merge" />
    <bpmn:sequenceFlow id="F_Stock_To_Check" sourceRef="Gateway_Stock_Merge" targetRef="Task_Check_Stock" />
    <bpmn:sequenceFlow id="F_Stock_2" sourceRef="Task_Check_Stock" targetRef="Gateway_Stock" />
    <bpmn:sequenceFlow id="F_Stock_Wait" sourceRef="Gateway_Stock" targetRef="Task_Backorder" />
    <bpmn:sequenceFlow id="F_Stock_Retry" sourceRef="Task_Backorder" targetRef="Gateway_Stock_Merge" />
    <bpmn:sequenceFlow id="F_Stock_OK" sourceRef="Gateway_Stock" targetRef="Task_Reserve_Stock" />
    <bpmn:sequenceFlow id="F_Stock_Join" sourceRef="Task_Reserve_Stock" targetRef="Join_Parallel" />
    <bpmn:sequenceFlow id="F_Sync" sourceRef="Join_Parallel" targetRef="Sub_Fulfillment" />
    <bpmn:sequenceFlow id="F_Post_Sub" sourceRef="Sub_Fulfillment" targetRef="Task_Update_ERP" />
    <bpmn:sequenceFlow id="F_ERP" sourceRef="Task_Update_ERP" targetRef="Task_Notify_Customer" />
    <bpmn:sequenceFlow id="F_Done" sourceRef="Task_Notify_Customer" targetRef="End_Order_Fulfilled" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Proc_Order">
      <bpmndi:BPMNShape id="Start_Order_di" bpmnElement="Start_Order">
        <dc:Bounds x="100" y="122" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="77" y="168" width="82" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Validate_di" bpmnElement="Task_Validate">
        <dc:Bounds x="196" y="100" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Split_Parallel_di" bpmnElement="Split_Parallel">
        <dc:Bounds x="356" y="115" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="346" y="95" width="70" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Auth_Payment_di" bpmnElement="Task_Auth_Payment">
        <dc:Bounds x="466" y="100" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_Payment_di" bpmnElement="Gateway_Payment">
        <dc:Bounds x="811" y="115" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="799" y="95" width="74" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Payment_Failed_di" bpmnElement="Task_Payment_Failed">
        <dc:Bounds x="946" y="100" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_Order_Cancelled_di" bpmnElement="End_Order_Cancelled">
        <dc:Bounds x="1138" y="122" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1113" y="168" width="86" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_Stock_Merge_di" bpmnElement="Gateway_Stock_Merge">
        <dc:Bounds x="491" y="235" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="470" y="215" width="92" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Check_Stock_di" bpmnElement="Task_Check_Stock">
        <dc:Bounds x="626" y="220" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_Stock_di" bpmnElement="Gateway_Stock">
        <dc:Bounds x="811" y="475" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="810" y="455" width="52" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Backorder_di" bpmnElement="Task_Backorder">
        <dc:Bounds x="946" y="460" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Reserve_Stock_di" bpmnElement="Task_Reserve_Stock">
        <dc:Bounds x="946" y="580" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Join_Parallel_di" bpmnElement="Join_Parallel">
        <dc:Bounds x="1106" y="355" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1028" y="373" width="72" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Sub_Fulfillment_di" bpmnElement="Sub_Fulfillment" isExpanded="true">
        <dc:Bounds x="1216" y="300" width="672" height="160" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Sub_Start_di" bpmnElement="Sub_Start">
        <dc:Bounds x="1246" y="357" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1232" y="403" width="60" height="28" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Sub_Pick_di" bpmnElement="Sub_Pick">
        <dc:Bounds x="1342" y="335" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Sub_Pack_di" bpmnElement="Sub_Pack">
        <dc:Bounds x="1502" y="335" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Sub_Label_di" bpmnElement="Sub_Label">
        <dc:Bounds x="1662" y="335" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Sub_End_di" bpmnElement="Sub_End">
        <dc:Bounds x="1822" y="357" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1820" y="403" width="36" height="40" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Update_ERP_di" bpmnElement="Task_Update_ERP">
        <dc:Bounds x="1948" y="340" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Notify_Customer_di" bpmnElement="Task_Notify_Customer">
        <dc:Bounds x="2108" y="340" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_Order_Fulfilled_di" bpmnElement="End_Order_Fulfilled">
        <dc:Bounds x="2268" y="362" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="2245" y="408" width="82" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="SF1_di" bpmnElement="SF1">
        <di:waypoint x="1282" y="375" />
        <di:waypoint x="1342" y="375" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SF2_di" bpmnElement="SF2">
        <di:waypoint x="1442" y="375" />
        <di:waypoint x="1502" y="375" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SF3_di" bpmnElement="SF3">
        <di:waypoint x="1602" y="375" />
        <di:waypoint x="1662" y="375" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="SF4_di" bpmnElement="SF4">
        <di:waypoint x="1762" y="375" />
        <di:waypoint x="1822" y="375" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Pay_1_di" bpmnElement="F_Pay_1">
        <di:waypoint x="406" y="140" />
        <di:waypoint x="466" y="140" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_1_di" bpmnElement="F_Stock_1">
        <di:waypoint x="381" y="165" />
        <di:waypoint x="381" y="260" />
        <di:waypoint x="491" y="260" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Pay_Fail_di" bpmnElement="F_Pay_Fail">
        <di:waypoint x="861" y="140" />
        <di:waypoint x="946" y="140" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Pay_OK_di" bpmnElement="F_Pay_OK">
        <di:waypoint x="836" y="165" />
        <di:waypoint x="836" y="260" />
        <di:waypoint x="1131" y="260" />
        <di:waypoint x="1131" y="355" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_To_Check_di" bpmnElement="F_Stock_To_Check">
        <di:waypoint x="541" y="260" />
        <di:waypoint x="626" y="260" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_Wait_di" bpmnElement="F_Stock_Wait">
        <di:waypoint x="861" y="500" />
        <di:waypoint x="946" y="500" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_OK_di" bpmnElement="F_Stock_OK">
        <di:waypoint x="836" y="525" />
        <di:waypoint x="836" y="620" />
        <di:waypoint x="946" y="620" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Sync_di" bpmnElement="F_Sync">
        <di:waypoint x="1156" y="380" />
        <di:waypoint x="1216" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F2_di" bpmnElement="F2">
        <di:waypoint x="296" y="140" />
        <di:waypoint x="356" y="140" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Pay_2_di" bpmnElement="F_Pay_2">
        <di:waypoint x="566" y="140" />
        <di:waypoint x="811" y="140" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_2_di" bpmnElement="F_Stock_2">
        <di:waypoint x="726" y="260" />
        <di:waypoint x="769" y="260" />
        <di:waypoint x="769" y="500" />
        <di:waypoint x="811" y="500" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_Retry_di" bpmnElement="F_Stock_Retry">
        <di:waypoint x="1046" y="500" />
        <di:waypoint x="1066" y="500" />
        <di:waypoint x="1066" y="700" />
        <di:waypoint x="516" y="700" />
        <di:waypoint x="516" y="285" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Stock_Join_di" bpmnElement="F_Stock_Join">
        <di:waypoint x="1046" y="620" />
        <di:waypoint x="1131" y="620" />
        <di:waypoint x="1131" y="405" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F1_di" bpmnElement="F1">
        <di:waypoint x="136" y="140" />
        <di:waypoint x="196" y="140" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Pay_Cancel_di" bpmnElement="F_Pay_Cancel">
        <di:waypoint x="1046" y="140" />
        <di:waypoint x="1138" y="140" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Post_Sub_di" bpmnElement="F_Post_Sub">
        <di:waypoint x="1888" y="380" />
        <di:waypoint x="1948" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_ERP_di" bpmnElement="F_ERP">
        <di:waypoint x="2048" y="380" />
        <di:waypoint x="2108" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F_Done_di" bpmnElement="F_Done">
        <di:waypoint x="2208" y="380" />
        <di:waypoint x="2268" y="380" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
