dodil/erp-method

modules/sales-order/signoff/sales-order/history/sales-order_sales_order.v1.bpmn

<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dodil="https://git.dodil.io/dodil/erp-platform/bpmn/1" id="Definitions_sales-order_v1" name="Sales orders processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_sales-order_v1">
  <bpmn:documentation>Sales orders: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_sales-order_sales_order" name="Sales order" processRef="Process_sales-order_sales_order_v1" />
  <bpmn:participant id="Participant_customer" name="The customer (external)">
   <bpmn:documentation>Outside the system: the steps it sends are what the process waits on.</bpmn:documentation>
  </bpmn:participant>
  <bpmn:messageFlow id="Flow_Participant_customer__Task_customer_sends_po" sourceRef="Participant_customer" targetRef="Task_customer_sends_po" />
  <bpmn:messageFlow id="Flow_Participant_customer__Task_receive_confirmation" sourceRef="Participant_customer" targetRef="Task_receive_confirmation" />
 </bpmn:collaboration>
 <bpmn:process id="Process_sales-order_sales_order_v1" name="Sales order" isExecutable="false">
  <bpmn:documentation>Lifecycle of the sales order, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, confirmed, done, cancelled. Note: Fulfilment status (not started, partly delivered, delivered) and invoice status (nothing to invoice, to invoice, partly invoiced, invoiced) are DERIVED from the quantities on read; nothing stores them.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_sales_order">
   <bpmn:lane id="Lane_sales_order_system" name="The system">
    <bpmn:flowNodeRef>Start_sales_order</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_order_from_quote</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_ai_order_from_po</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_ai_check_po</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_finish_order</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_sales_order_none__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_ai_check_po__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_ai_check_po__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_sales_order_confirmed__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_sales_order_done</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_sales_order_sales_rep" name="Sales">
    <bpmn:flowNodeRef>Task_draft_by_hand</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_review_order</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_confirm_order</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_cancel_draft</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_send_confirmation</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_amend_order</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_sales_order_draft__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_amend_order__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_amend_order__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_sales_order_cancelled</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_sales_order_customer" name="The customer (external)">
    <bpmn:flowNodeRef>Task_customer_sends_po</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_receive_confirmation</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_customer_sends_po__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_customer_sends_po__if_end</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_sales_order_biller" name="Whoever invoices">
    <bpmn:flowNodeRef>Task_raise_deposit</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_request_invoice</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_raise_deposit__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_raise_deposit__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_request_invoice__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_request_invoice__if_end</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_sales_order_fulfiller" name="Whoever delivers (operations, the project lead, the warehouse)">
    <bpmn:flowNodeRef>Task_record_delivery</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_sales_order_order_admin" name="Sales operations / the owner">
    <bpmn:flowNodeRef>Task_cancel_order</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_sales_order" name="Sales order needed">
   <bpmn:outgoing>Flow_Start_sales_order__Gateway_sales_order_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:serviceTask id="Task_order_from_quote" name="Create the order from the accepted quote" dodil:step="order_from_quote" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to draft. When: a quote version was accepted. Effect: lines copied, keyed quote:{quote_id}@v{version}; a second hand-over returns the same order.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_none__if__Task_order_from_quote</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_order_from_quote__Gateway_customer_sends_po__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_draft_by_hand" name="Raise an order by hand" dodil:step="draft_by_hand">
   <bpmn:documentation>By: Sales. From none to draft. Effect: priced from the customer's list, taxed by the tax module.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_none__if__Task_draft_by_hand</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_draft_by_hand__Gateway_customer_sends_po__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_ai_order_from_po" name="AI drafts the order from the customer's PO (suggest)" dodil:step="ai_order_from_po" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to draft. When: a purchase order arrived and the step is on. Effect: a draft with lines matched to products and differences from the quote listed.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_none__if__Task_ai_order_from_po</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_ai_order_from_po__Gateway_customer_sends_po__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:receiveTask id="Task_customer_sends_po" name="The customer sends their purchase order" dodil:step="customer_sends_po" dodil:external="true">
   <bpmn:documentation>By: The customer. From draft to draft. When: the customer requires a PO. Done outside the system: the process waits for it.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_customer_sends_po__if__Task_customer_sends_po</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_customer_sends_po__Gateway_customer_sends_po__if_end</bpmn:outgoing>
  </bpmn:receiveTask>
  <bpmn:serviceTask id="Task_ai_check_po" name="AI compares the PO with the order (suggest)" dodil:step="ai_check_po" implementation="##unspecified">
   <bpmn:documentation>By: The system. From draft to draft. When: a PO document is attached. Effect: price, quantity and term differences listed for the rep.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_ai_check_po__if__Task_ai_check_po</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_ai_check_po__Gateway_ai_check_po__if_end</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_review_order" name="Review lines" dodil:step="review_order">
   <bpmn:documentation>By: Sales. From draft to draft.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_ai_check_po__if_end__Task_review_order</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_review_order__Gateway_sales_order_draft__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_confirm_order" name="Confirm the order" dodil:step="confirm_order">
   <bpmn:documentation>By: Sales. From draft to confirmed. When: lines priced and taxed; the customer is not on credit hold (or an admin overrode it); the PO number where required. Effect: numbered SO-YYYY-NNNN; prices and tax frozen; repeating lines handed to invoicing as schedules.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_draft__if__Task_confirm_order</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_confirm_order__Task_send_confirmation</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_cancel_draft" name="Cancel the draft" dodil:step="cancel_draft">
   <bpmn:documentation>By: Sales. From draft to cancelled.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_draft__if__Task_cancel_draft</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_cancel_draft__End_sales_order_cancelled</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_send_confirmation" name="Send the order confirmation" dodil:step="send_confirmation">
   <bpmn:documentation>By: Sales. From confirmed to confirmed. Effect: the document from the frozen order; the send recorded.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_confirm_order__Task_send_confirmation</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_send_confirmation__Task_receive_confirmation</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:receiveTask id="Task_receive_confirmation" name="The customer receives the confirmation" dodil:step="receive_confirmation" dodil:external="true">
   <bpmn:documentation>By: The customer. From confirmed to confirmed. Done outside the system: the process waits for it.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_send_confirmation__Task_receive_confirmation</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_receive_confirmation__Gateway_raise_deposit__if</bpmn:outgoing>
  </bpmn:receiveTask>
  <bpmn:userTask id="Task_raise_deposit" name="Raise the deposit invoice" dodil:step="raise_deposit">
   <bpmn:documentation>By: Whoever invoices. From confirmed to confirmed. When: the order's deposit setting is above zero. Effect: invoicing raises a deposit draft; later invoices deduct it.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_raise_deposit__if__Task_raise_deposit</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_raise_deposit__Gateway_raise_deposit__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_record_delivery" name="Record what was delivered or done" dodil:step="record_delivery">
   <bpmn:documentation>By: Whoever delivers (operations, the project lead, the warehouse). From confirmed to confirmed. Effect: delivered quantities per line; fulfilment status derived.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_raise_deposit__if_end__Task_record_delivery</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_record_delivery__Gateway_request_invoice__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_request_invoice" name="Ask invoicing for what is due" dodil:step="request_invoice">
   <bpmn:documentation>By: Whoever invoices. From confirmed to confirmed. When: a line has quantity to invoice (ordered or delivered, per its policy). Effect: one draft request; invoice status derived.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_request_invoice__if__Task_request_invoice</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_request_invoice__Gateway_request_invoice__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_amend_order" name="Amend the order" dodil:step="amend_order" dodil:approval="true">
   <bpmn:documentation>By: Sales. From confirmed to confirmed. When: no line reduced below what is delivered or invoiced. Requires: reason. Effect: revision n+1; a new confirmation can be sent. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_amend_order__if__Task_amend_order</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_amend_order__Gateway_amend_order__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_finish_order" name="Lock the finished order" dodil:step="finish_order" implementation="##unspecified">
   <bpmn:documentation>By: The system. From confirmed to done. When: every line delivered and invoiced in full. Effect: edits refused.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_confirmed__if__Task_finish_order</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_finish_order__End_sales_order_done</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_cancel_order" name="Cancel the confirmed order" dodil:step="cancel_order" dodil:approval="true">
   <bpmn:documentation>By: Sales operations / the owner. From confirmed to cancelled. When: nothing delivered, nothing invoiced. Requires: reason. Effect: drafts it requested are cancelled in invoicing. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_sales_order_confirmed__if__Task_cancel_order</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_cancel_order__End_sales_order_cancelled</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_sales_order_none__if" name="New sales order?">
   <bpmn:incoming>Flow_Start_sales_order__Gateway_sales_order_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_sales_order_none__if__Task_order_from_quote</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_sales_order_none__if__Task_draft_by_hand</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_sales_order_none__if__Task_ai_order_from_po</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_customer_sends_po__if" name="the customer requires a PO?">
   <bpmn:incoming>Flow_Task_order_from_quote__Gateway_customer_sends_po__if</bpmn:incoming>
   <bpmn:incoming>Flow_Task_draft_by_hand__Gateway_customer_sends_po__if</bpmn:incoming>
   <bpmn:incoming>Flow_Task_ai_order_from_po__Gateway_customer_sends_po__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_customer_sends_po__if__Task_customer_sends_po</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_customer_sends_po__if__Gateway_customer_sends_po__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_customer_sends_po__if_end">
   <bpmn:incoming>Flow_Gateway_customer_sends_po__if__Gateway_customer_sends_po__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_customer_sends_po__Gateway_customer_sends_po__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_customer_sends_po__if_end__Gateway_ai_check_po__if</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_ai_check_po__if" name="a PO document is attached?">
   <bpmn:incoming>Flow_Gateway_customer_sends_po__if_end__Gateway_ai_check_po__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_ai_check_po__if__Task_ai_check_po</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_ai_check_po__if__Gateway_ai_check_po__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_ai_check_po__if_end">
   <bpmn:incoming>Flow_Gateway_ai_check_po__if__Gateway_ai_check_po__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_ai_check_po__Gateway_ai_check_po__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_ai_check_po__if_end__Task_review_order</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_sales_order_draft__if" name="Sales order draft: what next?">
   <bpmn:incoming>Flow_Task_review_order__Gateway_sales_order_draft__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_sales_order_draft__if__Task_confirm_order</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_sales_order_draft__if__Task_cancel_draft</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_raise_deposit__if" name="the order's deposit setting is above zero?">
   <bpmn:incoming>Flow_Task_receive_confirmation__Gateway_raise_deposit__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_raise_deposit__if__Task_raise_deposit</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_raise_deposit__if__Gateway_raise_deposit__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_raise_deposit__if_end">
   <bpmn:incoming>Flow_Gateway_raise_deposit__if__Gateway_raise_deposit__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_raise_deposit__Gateway_raise_deposit__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_raise_deposit__if_end__Task_record_delivery</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_request_invoice__if" name="a line has quantity to invoice (ordered or delivered, per its policy)?">
   <bpmn:incoming>Flow_Task_record_delivery__Gateway_request_invoice__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_request_invoice__if__Task_request_invoice</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_request_invoice__if__Gateway_request_invoice__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_request_invoice__if_end">
   <bpmn:incoming>Flow_Gateway_request_invoice__if__Gateway_request_invoice__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_request_invoice__Gateway_request_invoice__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_request_invoice__if_end__Gateway_amend_order__if</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_amend_order__if" name="no line reduced below what is delivered or invoiced?">
   <bpmn:incoming>Flow_Gateway_request_invoice__if_end__Gateway_amend_order__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_amend_order__if__Task_amend_order</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_amend_order__if__Gateway_amend_order__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_amend_order__if_end">
   <bpmn:incoming>Flow_Gateway_amend_order__if__Gateway_amend_order__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_amend_order__Gateway_amend_order__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_amend_order__if_end__Gateway_sales_order_confirmed__if</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_sales_order_confirmed__if" name="Sales order confirmed: what next?">
   <bpmn:incoming>Flow_Gateway_amend_order__if_end__Gateway_sales_order_confirmed__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_sales_order_confirmed__if__Task_finish_order</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_sales_order_confirmed__if__Task_cancel_order</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_sales_order_cancelled" name="Sales order cancelled">
   <bpmn:incoming>Flow_Task_cancel_draft__End_sales_order_cancelled</bpmn:incoming>
   <bpmn:incoming>Flow_Task_cancel_order__End_sales_order_cancelled</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_sales_order_done" name="Sales order done">
   <bpmn:incoming>Flow_Task_finish_order__End_sales_order_done</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_none__if__Task_order_from_quote" sourceRef="Gateway_sales_order_none__if" targetRef="Task_order_from_quote" />
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_none__if__Task_draft_by_hand" sourceRef="Gateway_sales_order_none__if" targetRef="Task_draft_by_hand" />
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_none__if__Task_ai_order_from_po" sourceRef="Gateway_sales_order_none__if" targetRef="Task_ai_order_from_po" />
  <bpmn:sequenceFlow id="Flow_Start_sales_order__Gateway_sales_order_none__if" sourceRef="Start_sales_order" targetRef="Gateway_sales_order_none__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_customer_sends_po__if__Task_customer_sends_po" name="the customer requires a PO" sourceRef="Gateway_customer_sends_po__if" targetRef="Task_customer_sends_po" />
  <bpmn:sequenceFlow id="Flow_Gateway_customer_sends_po__if__Gateway_customer_sends_po__if_end" name="otherwise" sourceRef="Gateway_customer_sends_po__if" targetRef="Gateway_customer_sends_po__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_customer_sends_po__Gateway_customer_sends_po__if_end" sourceRef="Task_customer_sends_po" targetRef="Gateway_customer_sends_po__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_ai_check_po__if__Task_ai_check_po" name="a PO document is attached" sourceRef="Gateway_ai_check_po__if" targetRef="Task_ai_check_po" />
  <bpmn:sequenceFlow id="Flow_Gateway_ai_check_po__if__Gateway_ai_check_po__if_end" name="otherwise" sourceRef="Gateway_ai_check_po__if" targetRef="Gateway_ai_check_po__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_ai_check_po__Gateway_ai_check_po__if_end" sourceRef="Task_ai_check_po" targetRef="Gateway_ai_check_po__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_customer_sends_po__if_end__Gateway_ai_check_po__if" sourceRef="Gateway_customer_sends_po__if_end" targetRef="Gateway_ai_check_po__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_ai_check_po__if_end__Task_review_order" sourceRef="Gateway_ai_check_po__if_end" targetRef="Task_review_order" />
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_draft__if__Task_confirm_order" sourceRef="Gateway_sales_order_draft__if" targetRef="Task_confirm_order" />
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_draft__if__Task_cancel_draft" sourceRef="Gateway_sales_order_draft__if" targetRef="Task_cancel_draft" />
  <bpmn:sequenceFlow id="Flow_Task_review_order__Gateway_sales_order_draft__if" sourceRef="Task_review_order" targetRef="Gateway_sales_order_draft__if" />
  <bpmn:sequenceFlow id="Flow_Task_order_from_quote__Gateway_customer_sends_po__if" sourceRef="Task_order_from_quote" targetRef="Gateway_customer_sends_po__if" />
  <bpmn:sequenceFlow id="Flow_Task_draft_by_hand__Gateway_customer_sends_po__if" sourceRef="Task_draft_by_hand" targetRef="Gateway_customer_sends_po__if" />
  <bpmn:sequenceFlow id="Flow_Task_ai_order_from_po__Gateway_customer_sends_po__if" sourceRef="Task_ai_order_from_po" targetRef="Gateway_customer_sends_po__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_raise_deposit__if__Task_raise_deposit" name="the order's deposit setting is above zero" sourceRef="Gateway_raise_deposit__if" targetRef="Task_raise_deposit" />
  <bpmn:sequenceFlow id="Flow_Gateway_raise_deposit__if__Gateway_raise_deposit__if_end" name="otherwise" sourceRef="Gateway_raise_deposit__if" targetRef="Gateway_raise_deposit__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_raise_deposit__Gateway_raise_deposit__if_end" sourceRef="Task_raise_deposit" targetRef="Gateway_raise_deposit__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_request_invoice__if__Task_request_invoice" name="a line has quantity to invoice (ordered or delivered, per its policy)" sourceRef="Gateway_request_invoice__if" targetRef="Task_request_invoice" />
  <bpmn:sequenceFlow id="Flow_Gateway_request_invoice__if__Gateway_request_invoice__if_end" name="otherwise" sourceRef="Gateway_request_invoice__if" targetRef="Gateway_request_invoice__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_request_invoice__Gateway_request_invoice__if_end" sourceRef="Task_request_invoice" targetRef="Gateway_request_invoice__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_amend_order__if__Task_amend_order" name="no line reduced below what is delivered or invoiced" sourceRef="Gateway_amend_order__if" targetRef="Task_amend_order" />
  <bpmn:sequenceFlow id="Flow_Gateway_amend_order__if__Gateway_amend_order__if_end" name="otherwise" sourceRef="Gateway_amend_order__if" targetRef="Gateway_amend_order__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_amend_order__Gateway_amend_order__if_end" sourceRef="Task_amend_order" targetRef="Gateway_amend_order__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_send_confirmation__Task_receive_confirmation" sourceRef="Task_send_confirmation" targetRef="Task_receive_confirmation" />
  <bpmn:sequenceFlow id="Flow_Task_receive_confirmation__Gateway_raise_deposit__if" sourceRef="Task_receive_confirmation" targetRef="Gateway_raise_deposit__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_raise_deposit__if_end__Task_record_delivery" sourceRef="Gateway_raise_deposit__if_end" targetRef="Task_record_delivery" />
  <bpmn:sequenceFlow id="Flow_Task_record_delivery__Gateway_request_invoice__if" sourceRef="Task_record_delivery" targetRef="Gateway_request_invoice__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_request_invoice__if_end__Gateway_amend_order__if" sourceRef="Gateway_request_invoice__if_end" targetRef="Gateway_amend_order__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_confirmed__if__Task_finish_order" sourceRef="Gateway_sales_order_confirmed__if" targetRef="Task_finish_order" />
  <bpmn:sequenceFlow id="Flow_Gateway_sales_order_confirmed__if__Task_cancel_order" sourceRef="Gateway_sales_order_confirmed__if" targetRef="Task_cancel_order" />
  <bpmn:sequenceFlow id="Flow_Gateway_amend_order__if_end__Gateway_sales_order_confirmed__if" sourceRef="Gateway_amend_order__if_end" targetRef="Gateway_sales_order_confirmed__if" />
  <bpmn:sequenceFlow id="Flow_Task_confirm_order__Task_send_confirmation" sourceRef="Task_confirm_order" targetRef="Task_send_confirmation" />
  <bpmn:sequenceFlow id="Flow_Task_cancel_draft__End_sales_order_cancelled" sourceRef="Task_cancel_draft" targetRef="End_sales_order_cancelled" />
  <bpmn:sequenceFlow id="Flow_Task_finish_order__End_sales_order_done" sourceRef="Task_finish_order" targetRef="End_sales_order_done" />
  <bpmn:sequenceFlow id="Flow_Task_cancel_order__End_sales_order_cancelled" sourceRef="Task_cancel_order" targetRef="End_sales_order_cancelled" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_sales-order_v1">
  <bpmndi:BPMNPlane id="BPMNPlane_sales-order_v1" bpmnElement="Collaboration_sales-order_v1">
   <bpmndi:BPMNShape id="Participant_sales-order_sales_order_di" bpmnElement="Participant_sales-order_sales_order" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="3850" height="1320" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_sales_order_system_di" bpmnElement="Lane_sales_order_system" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="3820" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_sales_order_sales_rep_di" bpmnElement="Lane_sales_order_sales_rep" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="3820" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_sales_order_customer_di" bpmnElement="Lane_sales_order_customer" isHorizontal="true">
    <dc:Bounds x="30" y="520" width="3820" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_sales_order_biller_di" bpmnElement="Lane_sales_order_biller" isHorizontal="true">
    <dc:Bounds x="30" y="780" width="3820" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_sales_order_fulfiller_di" bpmnElement="Lane_sales_order_fulfiller" isHorizontal="true">
    <dc:Bounds x="30" y="1040" width="3820" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_sales_order_order_admin_di" bpmnElement="Lane_sales_order_order_admin" isHorizontal="true">
    <dc:Bounds x="30" y="1180" width="3820" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_sales_order_di" bpmnElement="Start_sales_order">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_order_from_quote_di" bpmnElement="Task_order_from_quote">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_draft_by_hand_di" bpmnElement="Task_draft_by_hand">
    <dc:Bounds x="465" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_ai_order_from_po_di" bpmnElement="Task_ai_order_from_po">
    <dc:Bounds x="465" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_customer_sends_po_di" bpmnElement="Task_customer_sends_po">
    <dc:Bounds x="805" y="540" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_ai_check_po_di" bpmnElement="Task_ai_check_po">
    <dc:Bounds x="1145" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_review_order_di" bpmnElement="Task_review_order">
    <dc:Bounds x="1315" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_confirm_order_di" bpmnElement="Task_confirm_order">
    <dc:Bounds x="1655" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_cancel_draft_di" bpmnElement="Task_cancel_draft">
    <dc:Bounds x="1655" y="400" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_send_confirmation_di" bpmnElement="Task_send_confirmation">
    <dc:Bounds x="1825" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_receive_confirmation_di" bpmnElement="Task_receive_confirmation">
    <dc:Bounds x="1995" y="540" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_raise_deposit_di" bpmnElement="Task_raise_deposit">
    <dc:Bounds x="2335" y="800" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_record_delivery_di" bpmnElement="Task_record_delivery">
    <dc:Bounds x="2505" y="1060" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_request_invoice_di" bpmnElement="Task_request_invoice">
    <dc:Bounds x="2845" y="800" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_amend_order_di" bpmnElement="Task_amend_order">
    <dc:Bounds x="3185" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_finish_order_di" bpmnElement="Task_finish_order">
    <dc:Bounds x="3525" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_cancel_order_di" bpmnElement="Task_cancel_order">
    <dc:Bounds x="3525" y="1200" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_sales_order_none__if_di" bpmnElement="Gateway_sales_order_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_customer_sends_po__if_di" bpmnElement="Gateway_customer_sends_po__if">
    <dc:Bounds x="660" y="555" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_customer_sends_po__if_end_di" bpmnElement="Gateway_customer_sends_po__if_end">
    <dc:Bounds x="830" y="675" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_ai_check_po__if_di" bpmnElement="Gateway_ai_check_po__if">
    <dc:Bounds x="1000" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_ai_check_po__if_end_di" bpmnElement="Gateway_ai_check_po__if_end">
    <dc:Bounds x="1170" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_sales_order_draft__if_di" bpmnElement="Gateway_sales_order_draft__if">
    <dc:Bounds x="1510" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_raise_deposit__if_di" bpmnElement="Gateway_raise_deposit__if">
    <dc:Bounds x="2190" y="815" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_raise_deposit__if_end_di" bpmnElement="Gateway_raise_deposit__if_end">
    <dc:Bounds x="2360" y="935" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_request_invoice__if_di" bpmnElement="Gateway_request_invoice__if">
    <dc:Bounds x="2700" y="815" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_request_invoice__if_end_di" bpmnElement="Gateway_request_invoice__if_end">
    <dc:Bounds x="2870" y="935" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_amend_order__if_di" bpmnElement="Gateway_amend_order__if">
    <dc:Bounds x="3040" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_amend_order__if_end_di" bpmnElement="Gateway_amend_order__if_end">
    <dc:Bounds x="3210" y="415" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_sales_order_confirmed__if_di" bpmnElement="Gateway_sales_order_confirmed__if">
    <dc:Bounds x="3380" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_sales_order_cancelled_di" bpmnElement="End_sales_order_cancelled">
    <dc:Bounds x="1857" y="422" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_sales_order_done_di" bpmnElement="End_sales_order_done">
    <dc:Bounds x="3727" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_none__if__Task_order_from_quote_di" bpmnElement="Flow_Gateway_sales_order_none__if__Task_order_from_quote">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_none__if__Task_draft_by_hand_di" bpmnElement="Flow_Gateway_sales_order_none__if__Task_draft_by_hand">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="320" />
    <di:waypoint x="465" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_none__if__Task_ai_order_from_po_di" bpmnElement="Flow_Gateway_sales_order_none__if__Task_ai_order_from_po">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="180" />
    <di:waypoint x="465" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_sales_order__Gateway_sales_order_none__if_di" bpmnElement="Flow_Start_sales_order__Gateway_sales_order_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_customer_sends_po__if__Task_customer_sends_po_di" bpmnElement="Flow_Gateway_customer_sends_po__if__Task_customer_sends_po">
    <di:waypoint x="710" y="580" />
    <di:waypoint x="805" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_customer_sends_po__if__Gateway_customer_sends_po__if_end_di" bpmnElement="Flow_Gateway_customer_sends_po__if__Gateway_customer_sends_po__if_end">
    <di:waypoint x="710" y="580" />
    <di:waypoint x="805" y="580" />
    <di:waypoint x="805" y="700" />
    <di:waypoint x="830" y="700" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_customer_sends_po__Gateway_customer_sends_po__if_end_di" bpmnElement="Flow_Task_customer_sends_po__Gateway_customer_sends_po__if_end">
    <di:waypoint x="855" y="620" />
    <di:waypoint x="855" y="740" />
    <di:waypoint x="855" y="740" />
    <di:waypoint x="855" y="725" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_ai_check_po__if__Task_ai_check_po_di" bpmnElement="Flow_Gateway_ai_check_po__if__Task_ai_check_po">
    <di:waypoint x="1050" y="60" />
    <di:waypoint x="1145" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_ai_check_po__if__Gateway_ai_check_po__if_end_di" bpmnElement="Flow_Gateway_ai_check_po__if__Gateway_ai_check_po__if_end">
    <di:waypoint x="1050" y="60" />
    <di:waypoint x="1145" y="60" />
    <di:waypoint x="1145" y="180" />
    <di:waypoint x="1170" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_ai_check_po__Gateway_ai_check_po__if_end_di" bpmnElement="Flow_Task_ai_check_po__Gateway_ai_check_po__if_end">
    <di:waypoint x="1195" y="100" />
    <di:waypoint x="1195" y="226" />
    <di:waypoint x="1195" y="226" />
    <di:waypoint x="1195" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_customer_sends_po__if_end__Gateway_ai_check_po__if_di" bpmnElement="Flow_Gateway_customer_sends_po__if_end__Gateway_ai_check_po__if">
    <di:waypoint x="880" y="700" />
    <di:waypoint x="975" y="700" />
    <di:waypoint x="975" y="60" />
    <di:waypoint x="1000" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_ai_check_po__if_end__Task_review_order_di" bpmnElement="Flow_Gateway_ai_check_po__if_end__Task_review_order">
    <di:waypoint x="1220" y="180" />
    <di:waypoint x="1290" y="180" />
    <di:waypoint x="1290" y="320" />
    <di:waypoint x="1315" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_draft__if__Task_confirm_order_di" bpmnElement="Flow_Gateway_sales_order_draft__if__Task_confirm_order">
    <di:waypoint x="1560" y="320" />
    <di:waypoint x="1655" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_draft__if__Task_cancel_draft_di" bpmnElement="Flow_Gateway_sales_order_draft__if__Task_cancel_draft">
    <di:waypoint x="1560" y="320" />
    <di:waypoint x="1630" y="320" />
    <di:waypoint x="1630" y="440" />
    <di:waypoint x="1655" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_review_order__Gateway_sales_order_draft__if_di" bpmnElement="Flow_Task_review_order__Gateway_sales_order_draft__if">
    <di:waypoint x="1415" y="320" />
    <di:waypoint x="1510" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_order_from_quote__Gateway_customer_sends_po__if_di" bpmnElement="Flow_Task_order_from_quote__Gateway_customer_sends_po__if">
    <di:waypoint x="565" y="60" />
    <di:waypoint x="635" y="60" />
    <di:waypoint x="635" y="580" />
    <di:waypoint x="660" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_draft_by_hand__Gateway_customer_sends_po__if_di" bpmnElement="Flow_Task_draft_by_hand__Gateway_customer_sends_po__if">
    <di:waypoint x="565" y="320" />
    <di:waypoint x="635" y="320" />
    <di:waypoint x="635" y="580" />
    <di:waypoint x="660" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_ai_order_from_po__Gateway_customer_sends_po__if_di" bpmnElement="Flow_Task_ai_order_from_po__Gateway_customer_sends_po__if">
    <di:waypoint x="565" y="180" />
    <di:waypoint x="635" y="180" />
    <di:waypoint x="635" y="580" />
    <di:waypoint x="660" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_raise_deposit__if__Task_raise_deposit_di" bpmnElement="Flow_Gateway_raise_deposit__if__Task_raise_deposit">
    <di:waypoint x="2240" y="840" />
    <di:waypoint x="2335" y="840" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_raise_deposit__if__Gateway_raise_deposit__if_end_di" bpmnElement="Flow_Gateway_raise_deposit__if__Gateway_raise_deposit__if_end">
    <di:waypoint x="2240" y="840" />
    <di:waypoint x="2335" y="840" />
    <di:waypoint x="2335" y="960" />
    <di:waypoint x="2360" y="960" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_raise_deposit__Gateway_raise_deposit__if_end_di" bpmnElement="Flow_Task_raise_deposit__Gateway_raise_deposit__if_end">
    <di:waypoint x="2385" y="880" />
    <di:waypoint x="2385" y="1012" />
    <di:waypoint x="2385" y="1012" />
    <di:waypoint x="2385" y="985" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_request_invoice__if__Task_request_invoice_di" bpmnElement="Flow_Gateway_request_invoice__if__Task_request_invoice">
    <di:waypoint x="2750" y="840" />
    <di:waypoint x="2845" y="840" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_request_invoice__if__Gateway_request_invoice__if_end_di" bpmnElement="Flow_Gateway_request_invoice__if__Gateway_request_invoice__if_end">
    <di:waypoint x="2750" y="840" />
    <di:waypoint x="2845" y="840" />
    <di:waypoint x="2845" y="960" />
    <di:waypoint x="2870" y="960" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_request_invoice__Gateway_request_invoice__if_end_di" bpmnElement="Flow_Task_request_invoice__Gateway_request_invoice__if_end">
    <di:waypoint x="2895" y="880" />
    <di:waypoint x="2895" y="1018" />
    <di:waypoint x="2895" y="1018" />
    <di:waypoint x="2895" y="985" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_amend_order__if__Task_amend_order_di" bpmnElement="Flow_Gateway_amend_order__if__Task_amend_order">
    <di:waypoint x="3090" y="320" />
    <di:waypoint x="3185" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_amend_order__if__Gateway_amend_order__if_end_di" bpmnElement="Flow_Gateway_amend_order__if__Gateway_amend_order__if_end">
    <di:waypoint x="3090" y="320" />
    <di:waypoint x="3185" y="320" />
    <di:waypoint x="3185" y="440" />
    <di:waypoint x="3210" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_amend_order__Gateway_amend_order__if_end_di" bpmnElement="Flow_Task_amend_order__Gateway_amend_order__if_end">
    <di:waypoint x="3235" y="360" />
    <di:waypoint x="3235" y="480" />
    <di:waypoint x="3235" y="480" />
    <di:waypoint x="3235" y="465" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_send_confirmation__Task_receive_confirmation_di" bpmnElement="Flow_Task_send_confirmation__Task_receive_confirmation">
    <di:waypoint x="1925" y="320" />
    <di:waypoint x="1970" y="320" />
    <di:waypoint x="1970" y="580" />
    <di:waypoint x="1995" y="580" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_receive_confirmation__Gateway_raise_deposit__if_di" bpmnElement="Flow_Task_receive_confirmation__Gateway_raise_deposit__if">
    <di:waypoint x="2095" y="580" />
    <di:waypoint x="2165" y="580" />
    <di:waypoint x="2165" y="840" />
    <di:waypoint x="2190" y="840" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_raise_deposit__if_end__Task_record_delivery_di" bpmnElement="Flow_Gateway_raise_deposit__if_end__Task_record_delivery">
    <di:waypoint x="2410" y="960" />
    <di:waypoint x="2480" y="960" />
    <di:waypoint x="2480" y="1100" />
    <di:waypoint x="2505" y="1100" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_record_delivery__Gateway_request_invoice__if_di" bpmnElement="Flow_Task_record_delivery__Gateway_request_invoice__if">
    <di:waypoint x="2605" y="1100" />
    <di:waypoint x="2675" y="1100" />
    <di:waypoint x="2675" y="840" />
    <di:waypoint x="2700" y="840" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_request_invoice__if_end__Gateway_amend_order__if_di" bpmnElement="Flow_Gateway_request_invoice__if_end__Gateway_amend_order__if">
    <di:waypoint x="2920" y="960" />
    <di:waypoint x="3015" y="960" />
    <di:waypoint x="3015" y="320" />
    <di:waypoint x="3040" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_confirmed__if__Task_finish_order_di" bpmnElement="Flow_Gateway_sales_order_confirmed__if__Task_finish_order">
    <di:waypoint x="3430" y="60" />
    <di:waypoint x="3525" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_sales_order_confirmed__if__Task_cancel_order_di" bpmnElement="Flow_Gateway_sales_order_confirmed__if__Task_cancel_order">
    <di:waypoint x="3430" y="60" />
    <di:waypoint x="3500" y="60" />
    <di:waypoint x="3500" y="1240" />
    <di:waypoint x="3525" y="1240" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_amend_order__if_end__Gateway_sales_order_confirmed__if_di" bpmnElement="Flow_Gateway_amend_order__if_end__Gateway_sales_order_confirmed__if">
    <di:waypoint x="3260" y="440" />
    <di:waypoint x="3355" y="440" />
    <di:waypoint x="3355" y="60" />
    <di:waypoint x="3380" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_confirm_order__Task_send_confirmation_di" bpmnElement="Flow_Task_confirm_order__Task_send_confirmation">
    <di:waypoint x="1755" y="320" />
    <di:waypoint x="1825" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_cancel_draft__End_sales_order_cancelled_di" bpmnElement="Flow_Task_cancel_draft__End_sales_order_cancelled">
    <di:waypoint x="1755" y="440" />
    <di:waypoint x="1857" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_finish_order__End_sales_order_done_di" bpmnElement="Flow_Task_finish_order__End_sales_order_done">
    <di:waypoint x="3625" y="60" />
    <di:waypoint x="3727" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_cancel_order__End_sales_order_cancelled_di" bpmnElement="Flow_Task_cancel_order__End_sales_order_cancelled">
    <di:waypoint x="3575" y="1280" />
    <di:waypoint x="3575" y="1301" />
    <di:waypoint x="1875" y="1301" />
    <di:waypoint x="1875" y="458" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNShape id="Participant_customer_di" bpmnElement="Participant_customer" isHorizontal="true">
    <dc:Bounds x="0" y="1360" width="3850" height="60" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Participant_customer__Task_customer_sends_po_di" bpmnElement="Flow_Participant_customer__Task_customer_sends_po">
    <di:waypoint x="855" y="1360" />
    <di:waypoint x="855" y="620" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Participant_customer__Task_receive_confirmation_di" bpmnElement="Flow_Participant_customer__Task_receive_confirmation">
    <di:waypoint x="2045" y="1360" />
    <di:waypoint x="2045" y="620" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>