dodil/erp-method
modules/sales-order/signoff/sales-order/history/sales-order_sales_order.v2.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_v2" 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_v2">
<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_v2" />
<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_v2" 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. For the screens and agents, the brick answers each order's readiness for its next transitions as a list of {gate, met, reason, fix}: the gate's key (as named in each transition's gate), met true or false, the reason in words ("this customer requires a PO number"), and a fix (the field or the person who can clear it), so no screen or agent re-derives a rule. "Today" is the date in business_timezone.</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_accept_suggestion</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:flowNodeRef>Gateway_record_delivery__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_record_delivery__if_end</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__Task_accept_suggestion</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. When: ordered_on is today in business_timezone; every unit is one the product sells in. Effect: each line priced by find_price (priced_on today) and stores priced_from; 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__Task_accept_suggestion</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_ai_order_from_po" name="AI suggests 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 owner turned the step on. Effect: an empty draft with a suggestion: lines matched to product and unit, the PO number, differences from the quote; nothing on the order yet.</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__Task_accept_suggestion</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_accept_suggestion" name="Accept, change or reject the AI suggestion" dodil:step="accept_suggestion">
<bpmn:documentation>By: Sales. From draft to draft. Effect: accepted lines priced by find_price; what was accepted, changed or rejected, by whom, logged in so_suggestion.</bpmn:documentation>
<bpmn:incoming>Flow_Task_order_from_quote__Task_accept_suggestion</bpmn:incoming>
<bpmn:incoming>Flow_Task_draft_by_hand__Task_accept_suggestion</bpmn:incoming>
<bpmn:incoming>Flow_Task_ai_order_from_po__Task_accept_suggestion</bpmn:incoming>
<bpmn:outgoing>Flow_Task_accept_suggestion__Gateway_customer_sends_po__if</bpmn:outgoing>
</bpmn:userTask>
<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: readiness all met: customer_active, lines_priced (every line has priced_from), units_valid, lines_taxed, credit (not on hold, or an admin overrode it with a reason; mode warn is met with its reason), po_ref (where the customer's policy on that date requires one), no_open_suggestion. 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: readiness: deposit_set (the order's deposit percentage is above zero), within_total (deposits never exceed the order total). 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. When: delivered_on not after today nor before the confirmation; no line beyond its ordered quantity; a correction never below what is invoiced. Effect: delivered quantities per line, a correction as a new row; fulfilment status derived.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_record_delivery__if__Task_record_delivery</bpmn:incoming>
<bpmn:outgoing>Flow_Task_record_delivery__Gateway_record_delivery__if_end</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: readiness: something_due (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: readiness: not_done, not_below_done (no line below what is delivered or invoiced), approver_not_amender (where amendment_needs_approval). Requires: reason. Effect: revision n+1; only changed lines re-priced by find_price (priced_on today); 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: readiness: 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_accept_suggestion__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="readiness: deposit_set (the order's deposit percentage is above zero), within_total (deposits never exceed the order total)?">
<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__Gateway_record_delivery__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_record_delivery__if" name="delivered_on not after today nor before the confirmation; no line beyond its ordered quantity; a correction never below what is invoiced?">
<bpmn:incoming>Flow_Gateway_raise_deposit__if_end__Gateway_record_delivery__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_record_delivery__if__Task_record_delivery</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_record_delivery__if__Gateway_record_delivery__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_record_delivery__if_end">
<bpmn:incoming>Flow_Gateway_record_delivery__if__Gateway_record_delivery__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_record_delivery__Gateway_record_delivery__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_record_delivery__if_end__Gateway_request_invoice__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_request_invoice__if" name="readiness: something_due (a line has quantity to invoice, ordered or delivered per its policy)?">
<bpmn:incoming>Flow_Gateway_record_delivery__if_end__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="readiness: not_done, not_below_done (no line below what is delivered or invoiced), approver_not_amender (where amendment_needs_approval)?">
<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_Task_accept_suggestion__Gateway_customer_sends_po__if" sourceRef="Task_accept_suggestion" targetRef="Gateway_customer_sends_po__if" />
<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__Task_accept_suggestion" sourceRef="Task_order_from_quote" targetRef="Task_accept_suggestion" />
<bpmn:sequenceFlow id="Flow_Task_draft_by_hand__Task_accept_suggestion" sourceRef="Task_draft_by_hand" targetRef="Task_accept_suggestion" />
<bpmn:sequenceFlow id="Flow_Task_ai_order_from_po__Task_accept_suggestion" sourceRef="Task_ai_order_from_po" targetRef="Task_accept_suggestion" />
<bpmn:sequenceFlow id="Flow_Gateway_raise_deposit__if__Task_raise_deposit" name="readiness: deposit_set (the order's deposit percentage is above zero), within_total (deposits never exceed the order total)" 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_record_delivery__if__Task_record_delivery" name="delivered_on not after today nor before the confirmation; no line beyond its ordered quantity; a correction never below what is invoiced" sourceRef="Gateway_record_delivery__if" targetRef="Task_record_delivery" />
<bpmn:sequenceFlow id="Flow_Gateway_record_delivery__if__Gateway_record_delivery__if_end" name="otherwise" sourceRef="Gateway_record_delivery__if" targetRef="Gateway_record_delivery__if_end" />
<bpmn:sequenceFlow id="Flow_Task_record_delivery__Gateway_record_delivery__if_end" sourceRef="Task_record_delivery" targetRef="Gateway_record_delivery__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_request_invoice__if__Task_request_invoice" name="readiness: something_due (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="readiness: not_done, not_below_done (no line below what is delivered or invoiced), approver_not_amender (where amendment_needs_approval)" 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__Gateway_record_delivery__if" sourceRef="Gateway_raise_deposit__if_end" targetRef="Gateway_record_delivery__if" />
<bpmn:sequenceFlow id="Flow_Gateway_record_delivery__if_end__Gateway_request_invoice__if" sourceRef="Gateway_record_delivery__if_end" 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_v2">
<bpmndi:BPMNPlane id="BPMNPlane_sales-order_v2" bpmnElement="Collaboration_sales-order_v2">
<bpmndi:BPMNShape id="Participant_sales-order_sales_order_di" bpmnElement="Participant_sales-order_sales_order" isHorizontal="true">
<dc:Bounds x="0" y="0" width="4190" height="1440" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_sales_order_system_di" bpmnElement="Lane_sales_order_system" isHorizontal="true">
<dc:Bounds x="30" y="0" width="4160" 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="4160" 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="4160" 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="4160" 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="4160" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_sales_order_order_admin_di" bpmnElement="Lane_sales_order_order_admin" isHorizontal="true">
<dc:Bounds x="30" y="1300" width="4160" 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_accept_suggestion_di" bpmnElement="Task_accept_suggestion">
<dc:Bounds x="635" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_customer_sends_po_di" bpmnElement="Task_customer_sends_po">
<dc:Bounds x="975" y="540" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_ai_check_po_di" bpmnElement="Task_ai_check_po">
<dc:Bounds x="1315" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_review_order_di" bpmnElement="Task_review_order">
<dc:Bounds x="1485" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_confirm_order_di" bpmnElement="Task_confirm_order">
<dc:Bounds x="1825" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_cancel_draft_di" bpmnElement="Task_cancel_draft">
<dc:Bounds x="1825" y="400" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_send_confirmation_di" bpmnElement="Task_send_confirmation">
<dc:Bounds x="1995" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_receive_confirmation_di" bpmnElement="Task_receive_confirmation">
<dc:Bounds x="2165" y="540" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_raise_deposit_di" bpmnElement="Task_raise_deposit">
<dc:Bounds x="2505" y="800" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_record_delivery_di" bpmnElement="Task_record_delivery">
<dc:Bounds x="2845" y="1060" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_request_invoice_di" bpmnElement="Task_request_invoice">
<dc:Bounds x="3185" y="800" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_amend_order_di" bpmnElement="Task_amend_order">
<dc:Bounds x="3525" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_finish_order_di" bpmnElement="Task_finish_order">
<dc:Bounds x="3865" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_cancel_order_di" bpmnElement="Task_cancel_order">
<dc:Bounds x="3865" y="1320" 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="830" 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="1000" 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="1170" 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="1340" 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="1680" y="295" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_raise_deposit__if_di" bpmnElement="Gateway_raise_deposit__if">
<dc:Bounds x="2360" 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="2530" y="935" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_record_delivery__if_di" bpmnElement="Gateway_record_delivery__if">
<dc:Bounds x="2700" y="1075" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_record_delivery__if_end_di" bpmnElement="Gateway_record_delivery__if_end">
<dc:Bounds x="2870" y="1195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_request_invoice__if_di" bpmnElement="Gateway_request_invoice__if">
<dc:Bounds x="3040" 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="3210" y="935" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_amend_order__if_di" bpmnElement="Gateway_amend_order__if">
<dc:Bounds x="3380" 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="3550" 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="3720" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_sales_order_cancelled_di" bpmnElement="End_sales_order_cancelled">
<dc:Bounds x="2027" y="422" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_sales_order_done_di" bpmnElement="End_sales_order_done">
<dc:Bounds x="4067" 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="880" y="580" />
<di:waypoint x="975" 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="880" y="580" />
<di:waypoint x="975" y="580" />
<di:waypoint x="975" y="700" />
<di:waypoint x="1000" 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="1025" y="620" />
<di:waypoint x="1025" y="740" />
<di:waypoint x="1025" y="740" />
<di:waypoint x="1025" 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="1220" y="60" />
<di:waypoint x="1315" 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="1220" y="60" />
<di:waypoint x="1315" y="60" />
<di:waypoint x="1315" y="180" />
<di:waypoint x="1340" 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="1365" y="100" />
<di:waypoint x="1365" y="226" />
<di:waypoint x="1365" y="226" />
<di:waypoint x="1365" y="205" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_accept_suggestion__Gateway_customer_sends_po__if_di" bpmnElement="Flow_Task_accept_suggestion__Gateway_customer_sends_po__if">
<di:waypoint x="735" y="320" />
<di:waypoint x="805" y="320" />
<di:waypoint x="805" y="580" />
<di:waypoint x="830" y="580" />
</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="1050" y="700" />
<di:waypoint x="1145" y="700" />
<di:waypoint x="1145" y="60" />
<di:waypoint x="1170" 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="1390" y="180" />
<di:waypoint x="1460" y="180" />
<di:waypoint x="1460" y="320" />
<di:waypoint x="1485" 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="1730" y="320" />
<di:waypoint x="1825" 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="1730" y="320" />
<di:waypoint x="1800" y="320" />
<di:waypoint x="1800" y="440" />
<di:waypoint x="1825" 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="1585" y="320" />
<di:waypoint x="1680" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_order_from_quote__Task_accept_suggestion_di" bpmnElement="Flow_Task_order_from_quote__Task_accept_suggestion">
<di:waypoint x="565" y="60" />
<di:waypoint x="610" y="60" />
<di:waypoint x="610" y="320" />
<di:waypoint x="635" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_draft_by_hand__Task_accept_suggestion_di" bpmnElement="Flow_Task_draft_by_hand__Task_accept_suggestion">
<di:waypoint x="565" y="320" />
<di:waypoint x="635" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_ai_order_from_po__Task_accept_suggestion_di" bpmnElement="Flow_Task_ai_order_from_po__Task_accept_suggestion">
<di:waypoint x="565" y="180" />
<di:waypoint x="610" y="180" />
<di:waypoint x="610" y="320" />
<di:waypoint x="635" y="320" />
</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="2410" y="840" />
<di:waypoint x="2505" 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="2410" y="840" />
<di:waypoint x="2505" y="840" />
<di:waypoint x="2505" y="960" />
<di:waypoint x="2530" 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="2555" y="880" />
<di:waypoint x="2555" y="1012" />
<di:waypoint x="2555" y="1012" />
<di:waypoint x="2555" y="985" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_record_delivery__if__Task_record_delivery_di" bpmnElement="Flow_Gateway_record_delivery__if__Task_record_delivery">
<di:waypoint x="2750" y="1100" />
<di:waypoint x="2845" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_record_delivery__if__Gateway_record_delivery__if_end_di" bpmnElement="Flow_Gateway_record_delivery__if__Gateway_record_delivery__if_end">
<di:waypoint x="2750" y="1100" />
<di:waypoint x="2845" y="1100" />
<di:waypoint x="2845" y="1220" />
<di:waypoint x="2870" y="1220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_record_delivery__Gateway_record_delivery__if_end_di" bpmnElement="Flow_Task_record_delivery__Gateway_record_delivery__if_end">
<di:waypoint x="2895" y="1140" />
<di:waypoint x="2895" y="1278" />
<di:waypoint x="2895" y="1278" />
<di:waypoint x="2895" y="1245" />
</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="3090" y="840" />
<di:waypoint x="3185" 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="3090" y="840" />
<di:waypoint x="3185" y="840" />
<di:waypoint x="3185" y="960" />
<di:waypoint x="3210" 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="3235" y="880" />
<di:waypoint x="3235" y="1000" />
<di:waypoint x="3235" y="1000" />
<di:waypoint x="3235" 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="3430" y="320" />
<di:waypoint x="3525" 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="3430" y="320" />
<di:waypoint x="3525" y="320" />
<di:waypoint x="3525" y="440" />
<di:waypoint x="3550" 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="3575" y="360" />
<di:waypoint x="3575" y="486" />
<di:waypoint x="3575" y="486" />
<di:waypoint x="3575" 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="2095" y="320" />
<di:waypoint x="2140" y="320" />
<di:waypoint x="2140" y="580" />
<di:waypoint x="2165" 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="2265" y="580" />
<di:waypoint x="2335" y="580" />
<di:waypoint x="2335" y="840" />
<di:waypoint x="2360" y="840" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_raise_deposit__if_end__Gateway_record_delivery__if_di" bpmnElement="Flow_Gateway_raise_deposit__if_end__Gateway_record_delivery__if">
<di:waypoint x="2580" y="960" />
<di:waypoint x="2675" y="960" />
<di:waypoint x="2675" y="1100" />
<di:waypoint x="2700" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_record_delivery__if_end__Gateway_request_invoice__if_di" bpmnElement="Flow_Gateway_record_delivery__if_end__Gateway_request_invoice__if">
<di:waypoint x="2920" y="1220" />
<di:waypoint x="3015" y="1220" />
<di:waypoint x="3015" y="840" />
<di:waypoint x="3040" 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="3260" y="960" />
<di:waypoint x="3355" y="960" />
<di:waypoint x="3355" y="320" />
<di:waypoint x="3380" 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="3770" y="60" />
<di:waypoint x="3865" 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="3770" y="60" />
<di:waypoint x="3840" y="60" />
<di:waypoint x="3840" y="1360" />
<di:waypoint x="3865" y="1360" />
</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="3600" y="440" />
<di:waypoint x="3695" y="440" />
<di:waypoint x="3695" y="60" />
<di:waypoint x="3720" 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="1925" y="320" />
<di:waypoint x="1995" 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="1925" y="440" />
<di:waypoint x="2027" 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="3965" y="60" />
<di:waypoint x="4067" 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="3915" y="1400" />
<di:waypoint x="3915" y="1427" />
<di:waypoint x="2045" y="1427" />
<di:waypoint x="2045" y="458" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_customer_di" bpmnElement="Participant_customer" isHorizontal="true">
<dc:Bounds x="0" y="1480" width="4190" 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="1025" y="1480" />
<di:waypoint x="1025" y="620" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Participant_customer__Task_receive_confirmation_di" bpmnElement="Flow_Participant_customer__Task_receive_confirmation">
<di:waypoint x="2215" y="1480" />
<di:waypoint x="2215" y="620" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>