dodil/erp-method
modules/sales-order/signoff/sales-order/history/sales-order_sales_order.v5.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_v7" 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_v7">
<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_v7" />
<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_v7" 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. v5: the order TYPE decides which transitions apply (a FREE_OF_CHARGE order is never invoiced, a CREDIT_REQ never delivered, a RETURNS order follows the return_order workflow), and the incompletion rules add their incomplete:<field> gates to confirm, delivery (the fulfilment answer) and billing.</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_promise_dates</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_reschedule_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_inventory_delivers</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_supplier_delivers</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_finish_sales_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_promise_dates__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_promise_dates__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_reschedule_order__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_reschedule_order__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_inventory_delivers__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_inventory_delivers__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_supplier_delivers__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_supplier_delivers__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_order_suggestion</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_price_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_review_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_confirm_sales_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_cancel_draft_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_send_confirmation</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_amend_sales_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_price_order__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_price_order__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_sales_order_draft__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_amend_sales_order__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_amend_sales_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_sales_controller" name="A second person for money going back (the finance controller, the owner)">
<bpmn:flowNodeRef>Task_approve_memo_request</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_approve_memo_request__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_approve_memo_request__if_end</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_sales_order_order_admin" name="Sales operations / the owner">
<bpmn:flowNodeRef>Task_set_order_block</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_release_order_block</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_cancel_sales_order</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_set_order_block__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_set_order_block__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_release_order_block__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_release_order_block__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>Task_release_milestone</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_record_delivery__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_record_delivery__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_release_milestone__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_release_milestone__if_end</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; readiness: priced_by_product (every quote line priced by product's find_price, v5). Effect: type STANDARD; partners defaulted (v5); 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_order_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; an order type (v5); readiness: partners_valid (sold-to, ship-to, bill-to, payer, v5), reference_required (returns, memo requests, consignment issue: the order line or invoice referenced, v5). Effect: each line's item category determined from its type and the product's type (v5), priced by the pricing procedure, the BASE condition from find_price (priced_on today); taxed by the tax module for the ship-to.</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_order_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_order_suggestion</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_accept_order_suggestion" name="Accept, change or reject the AI suggestion" dodil:step="accept_order_suggestion">
<bpmn:documentation>By: Sales. From draft to draft. Effect: accepted lines priced by the pricing procedure; what was accepted, changed or rejected, by whom, logged in so_suggestion.</bpmn:documentation>
<bpmn:incoming>Flow_Task_order_from_quote__Task_accept_order_suggestion</bpmn:incoming>
<bpmn:incoming>Flow_Task_draft_by_hand__Task_accept_order_suggestion</bpmn:incoming>
<bpmn:incoming>Flow_Task_ai_order_from_po__Task_accept_order_suggestion</bpmn:incoming>
<bpmn:outgoing>Flow_Task_accept_order_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_price_order" name="Price the lines and the header (pricing procedure)" dodil:step="price_order">
<bpmn:documentation>By: Sales. From draft to draft. When: readiness: base_price_found (find_price answered every line), manual_within_limit (a typed condition within its type's limit), freight_computable (every line's weight known where FREIGHT applies). Effect: line_condition rows per line and the header's shares, each naming its record; nets rounded once and summed exactly (v5).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_price_order__if__Task_price_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_price_order__Gateway_price_order__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_promise_dates" name="Check availability and promise dates (ATP)" dodil:step="promise_dates" implementation="##unspecified">
<bpmn:documentation>By: The system. From draft to draft. When: inventory installed and the line is stocked (else the requested date is kept and said so). Effect: schedule lines per line from inventory's GET /atp: confirmed quantities and dates (v5); a shortfall never blocks.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_promise_dates__if__Task_promise_dates</bpmn:incoming>
<bpmn:outgoing>Flow_Task_promise_dates__Gateway_promise_dates__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_promise_dates__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_sales_order" name="Confirm the order" dodil:step="confirm_sales_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 (the PAYER not on hold, or an admin overrode it with a reason; mode warn is met with its reason; skipped for CASH, v5), po_ref (where the customer's policy on that date requires one), no_open_suggestion, delivery_multiple (v4: each line a multiple of its product's delivery rule; mode warn is met with its reason, block is not), incomplete:* (v5: every field the type's incompletion rules require for confirmation), site_allows_sale (v5: product site status at the delivering warehouse), plan_complete (v5: milestones total 100%), reference_required (v5). Effect: numbered from the order type's series (v5); prices, conditions and tax frozen; repeating lines handed to invoicing as schedules; with inventory installed, its goods lines reserved with their schedule lines (POST /reservations/sales-orders/{sales_order_id}, revision 1) and each line's stocked flag kept from the answer; third-party lines sent to purchasing as purchase requests (v5); RUSH asks for a delivery today; CASH has its delivery and invoice made at once; CREDIT_REQ, DEBIT_REQ and FREE_OF_CHARGE above the limit take the type's APPROVAL block; RETURNS follow the return_order workflow.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_sales_order_draft__if__Task_confirm_sales_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_confirm_sales_order__Task_send_confirmation</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_cancel_draft_order" name="Cancel the draft" dodil:step="cancel_draft_order">
<bpmn:documentation>By: Sales. From draft to cancelled.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_sales_order_draft__if__Task_cancel_draft_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_cancel_draft_order__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, with the promised dates per schedule line (v5); the send recorded.</bpmn:documentation>
<bpmn:incoming>Flow_Task_confirm_sales_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_approve_memo_request__if</bpmn:outgoing>
</bpmn:receiveTask>
<bpmn:userTask id="Task_approve_memo_request" name="Approve a credit or debit memo request, or a free-of-charge order" dodil:step="approve_memo_request" dodil:approval="true">
<bpmn:documentation>By: A second person for money going back (the finance controller, the owner). From confirmed to confirmed. When: readiness: approver_not_requester (neither the rep who raised it nor anyone with the same email or sign-in subject), within_invoiced (a credit never above the invoice line's net less earlier credits). Effect: the APPROVAL block released; a credit request asks invoicing for a credit note against the referenced invoice, a debit request for a draft; a free-of-charge order may be delivered (v5). An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_approve_memo_request__if__Task_approve_memo_request</bpmn:incoming>
<bpmn:outgoing>Flow_Task_approve_memo_request__Gateway_approve_memo_request__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_set_order_block" name="Set a delivery or billing block" dodil:step="set_order_block">
<bpmn:documentation>By: Sales operations / the owner. From confirmed to confirmed. When: a block reason of the right kind (delivery | billing). Requires: reason. Effect: a block row appended; the fulfilment answer or the invoice request stops at it (v5).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_set_order_block__if__Task_set_order_block</bpmn:incoming>
<bpmn:outgoing>Flow_Task_set_order_block__Gateway_set_order_block__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_release_order_block" name="Release a block" dodil:step="release_order_block">
<bpmn:documentation>By: Sales operations / the owner. From confirmed to confirmed. When: the block is set; an APPROVAL block only by approve_memo_request. Requires: reason. Effect: a release row appended.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_release_order_block__if__Task_release_order_block</bpmn:incoming>
<bpmn:outgoing>Flow_Task_release_order_block__Gateway_release_order_block__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_reschedule_order" name="Re-promise open quantities (daily)" dodil:step="reschedule_order" implementation="##unspecified">
<bpmn:documentation>By: The system. From confirmed to confirmed. When: an open schedule line not yet delivered; once per business date. Effect: a new schedule version with the reason; a later date raises a task for the owner; the reservation re-sent with the same revision and the new schedule version (v5).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_reschedule_order__if__Task_reschedule_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_reschedule_order__Gateway_reschedule_order__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<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); not CASH. Effect: invoicing raises a deposit draft; later invoices deduct it in part or in full (v5).</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 plus its over-delivery tolerance (v5); a correction never below what is invoiced; the quantity converts exactly to the base unit (v3); with inventory installed, a stocked line only with source inventory (v3); a third-party line only with source purchasing (v5); max_partials (v5); no delivery block (v5). Effect: delivered quantities per line, with the base quantity beside them, a correction as a new row; a line within its under-delivery tolerance is closed (v5); 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:serviceTask id="Task_inventory_delivers" name="Inventory delivers a stocked line" dodil:step="inventory_delivers" implementation="##unspecified">
<bpmn:documentation>By: The system. From confirmed to confirmed. When: inventory installed; the line is stocked; delivery_ref inv:<delivery number>. Effect: record_delivery with source inventory, called inside inventory's validation; a repeat with the same delivery_ref records once.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_inventory_delivers__if__Task_inventory_delivers</bpmn:incoming>
<bpmn:outgoing>Flow_Task_inventory_delivers__Gateway_inventory_delivers__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_supplier_delivers" name="The supplier ships a third-party line" dodil:step="supplier_delivers" implementation="##unspecified">
<bpmn:documentation>By: The system. From confirmed to confirmed. When: the line's item category is THIRD_PARTY; delivery_ref pur:<shipping notice>. Effect: record_delivery with source purchasing, called by purchasing; a repeat records once (v5).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_supplier_delivers__if__Task_supplier_delivers</bpmn:incoming>
<bpmn:outgoing>Flow_Task_supplier_delivers__Gateway_supplier_delivers__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_release_milestone" name="Release a billing milestone" dodil:step="release_milestone">
<bpmn:documentation>By: Whoever delivers (operations, the project lead, the warehouse). From confirmed to confirmed. When: the milestone's event happened (or its date is today or past); not released before. Effect: the milestone's billing block released; its value becomes due (v5).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_release_milestone__if__Task_release_milestone</bpmn:incoming>
<bpmn:outgoing>Flow_Task_release_milestone__Gateway_release_milestone__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 or milestone value to invoice, per its policy), billing_block (none set, v5), incomplete:* (the fields the type requires for billing, v5), billing_relevant (not a FREE_OF_CHARGE or CONS_FILL order, v5), deduction_within_remaining (no deposit deducted beyond what is left, v5). Effect: one draft request with its deposit deductions per deposit, each carrying the deposit's tax category (v5); 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_sales_order" name="Amend the order" dodil:step="amend_sales_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), delivery_multiple (v4, on changed lines), partners_unchanged_after_delivery (v5). Requires: reason. Effect: revision n+1; only changed lines re-priced by the pricing procedure (priced_on today), the header shares re-spread; changed lines re-promised; a new confirmation can be sent; with inventory installed, the reservation re-sent with revision n+1. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_amend_sales_order__if__Task_amend_sales_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_amend_sales_order__Gateway_amend_sales_order__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_finish_sales_order" name="Lock the finished order" dodil:step="finish_sales_order" implementation="##unspecified">
<bpmn:documentation>By: The system. From confirmed to done. When: every line delivered (or closed within tolerance) and invoiced in full, or not billing-relevant. Effect: edits refused.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_sales_order_confirmed__if__Task_finish_sales_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_finish_sales_order__End_sales_order_done</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_cancel_sales_order" name="Cancel the confirmed order" dodil:step="cancel_sales_order" dodil:approval="true">
<bpmn:documentation>By: Sales operations / the owner. From confirmed to cancelled. When: readiness: nothing_delivered, nothing_invoiced, third_party_cancellable (purchasing agreed, v5). Requires: reason. Effect: drafts it requested are cancelled in invoicing; an unused deposit is credited (v5); with inventory installed, the reservation released (POST /reservations/sales-orders/{sales_order_id}/release). An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_sales_order_confirmed__if__Task_cancel_sales_order</bpmn:incoming>
<bpmn:outgoing>Flow_Task_cancel_sales_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_order_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__Gateway_price_order__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_price_order__if" name="readiness: base_price_found (find_price answered every line), manual_within_limit (a typed condition within its type's limit), freight_computable (every line's weight known where FREIGHT applies)?">
<bpmn:incoming>Flow_Gateway_ai_check_po__if_end__Gateway_price_order__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_price_order__if__Task_price_order</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_price_order__if__Gateway_price_order__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_price_order__if_end">
<bpmn:incoming>Flow_Gateway_price_order__if__Gateway_price_order__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_price_order__Gateway_price_order__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_price_order__if_end__Gateway_promise_dates__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_promise_dates__if" name="inventory installed and the line is stocked (else the requested date is kept and said so)?">
<bpmn:incoming>Flow_Gateway_price_order__if_end__Gateway_promise_dates__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_promise_dates__if__Task_promise_dates</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_promise_dates__if__Gateway_promise_dates__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_promise_dates__if_end">
<bpmn:incoming>Flow_Gateway_promise_dates__if__Gateway_promise_dates__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_promise_dates__Gateway_promise_dates__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_promise_dates__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_sales_order</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_sales_order_draft__if__Task_cancel_draft_order</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_approve_memo_request__if" name="readiness: approver_not_requester (neither the rep who raised it nor anyone with the same email or sign-in subject), within_invoiced (a credit never above the invoice line's net less earlier credits)?">
<bpmn:incoming>Flow_Task_receive_confirmation__Gateway_approve_memo_request__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_approve_memo_request__if__Task_approve_memo_request</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_approve_memo_request__if__Gateway_approve_memo_request__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_approve_memo_request__if_end">
<bpmn:incoming>Flow_Gateway_approve_memo_request__if__Gateway_approve_memo_request__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_approve_memo_request__Gateway_approve_memo_request__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_approve_memo_request__if_end__Gateway_set_order_block__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_set_order_block__if" name="a block reason of the right kind (delivery | billing)?">
<bpmn:incoming>Flow_Gateway_approve_memo_request__if_end__Gateway_set_order_block__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_set_order_block__if__Task_set_order_block</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_set_order_block__if__Gateway_set_order_block__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_set_order_block__if_end">
<bpmn:incoming>Flow_Gateway_set_order_block__if__Gateway_set_order_block__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_set_order_block__Gateway_set_order_block__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_set_order_block__if_end__Gateway_release_order_block__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_release_order_block__if" name="the block is set; an APPROVAL block only by approve_memo_request?">
<bpmn:incoming>Flow_Gateway_set_order_block__if_end__Gateway_release_order_block__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_release_order_block__if__Task_release_order_block</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_release_order_block__if__Gateway_release_order_block__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_release_order_block__if_end">
<bpmn:incoming>Flow_Gateway_release_order_block__if__Gateway_release_order_block__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_release_order_block__Gateway_release_order_block__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_release_order_block__if_end__Gateway_reschedule_order__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_reschedule_order__if" name="an open schedule line not yet delivered; once per business date?">
<bpmn:incoming>Flow_Gateway_release_order_block__if_end__Gateway_reschedule_order__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_reschedule_order__if__Task_reschedule_order</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_reschedule_order__if__Gateway_reschedule_order__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_reschedule_order__if_end">
<bpmn:incoming>Flow_Gateway_reschedule_order__if__Gateway_reschedule_order__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_reschedule_order__Gateway_reschedule_order__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_reschedule_order__if_end__Gateway_raise_deposit__if</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); not CASH?">
<bpmn:incoming>Flow_Gateway_reschedule_order__if_end__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 plus its over-delivery tolerance (v5); a correction never below what is invoiced; the quantity converts exactly to the base unit (v3); with inventory installed, a stocked line only with source inventory (v3); a third-party line only with source purchasing (v5); max_partials (v5); no delivery block (v5)?">
<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_inventory_delivers__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_inventory_delivers__if" name="inventory installed; the line is stocked; delivery_ref inv:<delivery number>?">
<bpmn:incoming>Flow_Gateway_record_delivery__if_end__Gateway_inventory_delivers__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_inventory_delivers__if__Task_inventory_delivers</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_inventory_delivers__if__Gateway_inventory_delivers__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_inventory_delivers__if_end">
<bpmn:incoming>Flow_Gateway_inventory_delivers__if__Gateway_inventory_delivers__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_inventory_delivers__Gateway_inventory_delivers__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_inventory_delivers__if_end__Gateway_supplier_delivers__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_supplier_delivers__if" name="the line's item category is THIRD_PARTY; delivery_ref pur:<shipping notice>?">
<bpmn:incoming>Flow_Gateway_inventory_delivers__if_end__Gateway_supplier_delivers__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_supplier_delivers__if__Task_supplier_delivers</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_supplier_delivers__if__Gateway_supplier_delivers__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_supplier_delivers__if_end">
<bpmn:incoming>Flow_Gateway_supplier_delivers__if__Gateway_supplier_delivers__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_supplier_delivers__Gateway_supplier_delivers__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_supplier_delivers__if_end__Gateway_release_milestone__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_release_milestone__if" name="the milestone's event happened (or its date is today or past); not released before?">
<bpmn:incoming>Flow_Gateway_supplier_delivers__if_end__Gateway_release_milestone__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_release_milestone__if__Task_release_milestone</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_release_milestone__if__Gateway_release_milestone__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_release_milestone__if_end">
<bpmn:incoming>Flow_Gateway_release_milestone__if__Gateway_release_milestone__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_release_milestone__Gateway_release_milestone__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_release_milestone__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 or milestone value to invoice, per its policy), billing_block (none set, v5), incomplete:* (the fields the type requires for billing, v5), billing_relevant (not a FREE_OF_CHARGE or CONS_FILL order, v5), deduction_within_remaining (no deposit deducted beyond what is left, v5)?">
<bpmn:incoming>Flow_Gateway_release_milestone__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_sales_order__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_amend_sales_order__if" name="readiness: not_done, not_below_done (no line below what is delivered or invoiced), approver_not_amender (where amendment_needs_approval), delivery_multiple (v4, on changed lines), partners_unchanged_after_delivery (v5)?">
<bpmn:incoming>Flow_Gateway_request_invoice__if_end__Gateway_amend_sales_order__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_amend_sales_order__if__Task_amend_sales_order</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_amend_sales_order__if__Gateway_amend_sales_order__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_amend_sales_order__if_end">
<bpmn:incoming>Flow_Gateway_amend_sales_order__if__Gateway_amend_sales_order__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_amend_sales_order__Gateway_amend_sales_order__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_amend_sales_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_sales_order__if_end__Gateway_sales_order_confirmed__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_sales_order_confirmed__if__Task_finish_sales_order</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_sales_order_confirmed__if__Task_cancel_sales_order</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_sales_order_cancelled" name="Sales order cancelled">
<bpmn:incoming>Flow_Task_cancel_draft_order__End_sales_order_cancelled</bpmn:incoming>
<bpmn:incoming>Flow_Task_cancel_sales_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_sales_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_price_order__if__Task_price_order" name="readiness: base_price_found (find_price answered every line), manual_within_limit (a typed condition within its type's limit), freight_computable (every line's weight known where FREIGHT applies)" sourceRef="Gateway_price_order__if" targetRef="Task_price_order" />
<bpmn:sequenceFlow id="Flow_Gateway_price_order__if__Gateway_price_order__if_end" name="otherwise" sourceRef="Gateway_price_order__if" targetRef="Gateway_price_order__if_end" />
<bpmn:sequenceFlow id="Flow_Task_price_order__Gateway_price_order__if_end" sourceRef="Task_price_order" targetRef="Gateway_price_order__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_promise_dates__if__Task_promise_dates" name="inventory installed and the line is stocked (else the requested date is kept and said so)" sourceRef="Gateway_promise_dates__if" targetRef="Task_promise_dates" />
<bpmn:sequenceFlow id="Flow_Gateway_promise_dates__if__Gateway_promise_dates__if_end" name="otherwise" sourceRef="Gateway_promise_dates__if" targetRef="Gateway_promise_dates__if_end" />
<bpmn:sequenceFlow id="Flow_Task_promise_dates__Gateway_promise_dates__if_end" sourceRef="Task_promise_dates" targetRef="Gateway_promise_dates__if_end" />
<bpmn:sequenceFlow id="Flow_Task_accept_order_suggestion__Gateway_customer_sends_po__if" sourceRef="Task_accept_order_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__Gateway_price_order__if" sourceRef="Gateway_ai_check_po__if_end" targetRef="Gateway_price_order__if" />
<bpmn:sequenceFlow id="Flow_Gateway_price_order__if_end__Gateway_promise_dates__if" sourceRef="Gateway_price_order__if_end" targetRef="Gateway_promise_dates__if" />
<bpmn:sequenceFlow id="Flow_Gateway_promise_dates__if_end__Task_review_order" sourceRef="Gateway_promise_dates__if_end" targetRef="Task_review_order" />
<bpmn:sequenceFlow id="Flow_Gateway_sales_order_draft__if__Task_confirm_sales_order" sourceRef="Gateway_sales_order_draft__if" targetRef="Task_confirm_sales_order" />
<bpmn:sequenceFlow id="Flow_Gateway_sales_order_draft__if__Task_cancel_draft_order" sourceRef="Gateway_sales_order_draft__if" targetRef="Task_cancel_draft_order" />
<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_order_suggestion" sourceRef="Task_order_from_quote" targetRef="Task_accept_order_suggestion" />
<bpmn:sequenceFlow id="Flow_Task_draft_by_hand__Task_accept_order_suggestion" sourceRef="Task_draft_by_hand" targetRef="Task_accept_order_suggestion" />
<bpmn:sequenceFlow id="Flow_Task_ai_order_from_po__Task_accept_order_suggestion" sourceRef="Task_ai_order_from_po" targetRef="Task_accept_order_suggestion" />
<bpmn:sequenceFlow id="Flow_Gateway_approve_memo_request__if__Task_approve_memo_request" name="readiness: approver_not_requester (neither the rep who raised it nor anyone with the same email or sign-in subject), within_invoiced (a credit never above the invoice line's net less earlier credits)" sourceRef="Gateway_approve_memo_request__if" targetRef="Task_approve_memo_request" />
<bpmn:sequenceFlow id="Flow_Gateway_approve_memo_request__if__Gateway_approve_memo_request__if_end" name="otherwise" sourceRef="Gateway_approve_memo_request__if" targetRef="Gateway_approve_memo_request__if_end" />
<bpmn:sequenceFlow id="Flow_Task_approve_memo_request__Gateway_approve_memo_request__if_end" sourceRef="Task_approve_memo_request" targetRef="Gateway_approve_memo_request__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_set_order_block__if__Task_set_order_block" name="a block reason of the right kind (delivery | billing)" sourceRef="Gateway_set_order_block__if" targetRef="Task_set_order_block" />
<bpmn:sequenceFlow id="Flow_Gateway_set_order_block__if__Gateway_set_order_block__if_end" name="otherwise" sourceRef="Gateway_set_order_block__if" targetRef="Gateway_set_order_block__if_end" />
<bpmn:sequenceFlow id="Flow_Task_set_order_block__Gateway_set_order_block__if_end" sourceRef="Task_set_order_block" targetRef="Gateway_set_order_block__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_release_order_block__if__Task_release_order_block" name="the block is set; an APPROVAL block only by approve_memo_request" sourceRef="Gateway_release_order_block__if" targetRef="Task_release_order_block" />
<bpmn:sequenceFlow id="Flow_Gateway_release_order_block__if__Gateway_release_order_block__if_end" name="otherwise" sourceRef="Gateway_release_order_block__if" targetRef="Gateway_release_order_block__if_end" />
<bpmn:sequenceFlow id="Flow_Task_release_order_block__Gateway_release_order_block__if_end" sourceRef="Task_release_order_block" targetRef="Gateway_release_order_block__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_reschedule_order__if__Task_reschedule_order" name="an open schedule line not yet delivered; once per business date" sourceRef="Gateway_reschedule_order__if" targetRef="Task_reschedule_order" />
<bpmn:sequenceFlow id="Flow_Gateway_reschedule_order__if__Gateway_reschedule_order__if_end" name="otherwise" sourceRef="Gateway_reschedule_order__if" targetRef="Gateway_reschedule_order__if_end" />
<bpmn:sequenceFlow id="Flow_Task_reschedule_order__Gateway_reschedule_order__if_end" sourceRef="Task_reschedule_order" targetRef="Gateway_reschedule_order__if_end" />
<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); not CASH" 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 plus its over-delivery tolerance (v5); a correction never below what is invoiced; the quantity converts exactly to the base unit (v3); with inventory installed, a stocked line only with source inventory (v3); a third-party line only with source purchasing (v5); max_partials (v5); no delivery block (v5)" 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_inventory_delivers__if__Task_inventory_delivers" name="inventory installed; the line is stocked; delivery_ref inv:<delivery number>" sourceRef="Gateway_inventory_delivers__if" targetRef="Task_inventory_delivers" />
<bpmn:sequenceFlow id="Flow_Gateway_inventory_delivers__if__Gateway_inventory_delivers__if_end" name="otherwise" sourceRef="Gateway_inventory_delivers__if" targetRef="Gateway_inventory_delivers__if_end" />
<bpmn:sequenceFlow id="Flow_Task_inventory_delivers__Gateway_inventory_delivers__if_end" sourceRef="Task_inventory_delivers" targetRef="Gateway_inventory_delivers__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_supplier_delivers__if__Task_supplier_delivers" name="the line's item category is THIRD_PARTY; delivery_ref pur:<shipping notice>" sourceRef="Gateway_supplier_delivers__if" targetRef="Task_supplier_delivers" />
<bpmn:sequenceFlow id="Flow_Gateway_supplier_delivers__if__Gateway_supplier_delivers__if_end" name="otherwise" sourceRef="Gateway_supplier_delivers__if" targetRef="Gateway_supplier_delivers__if_end" />
<bpmn:sequenceFlow id="Flow_Task_supplier_delivers__Gateway_supplier_delivers__if_end" sourceRef="Task_supplier_delivers" targetRef="Gateway_supplier_delivers__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_release_milestone__if__Task_release_milestone" name="the milestone's event happened (or its date is today or past); not released before" sourceRef="Gateway_release_milestone__if" targetRef="Task_release_milestone" />
<bpmn:sequenceFlow id="Flow_Gateway_release_milestone__if__Gateway_release_milestone__if_end" name="otherwise" sourceRef="Gateway_release_milestone__if" targetRef="Gateway_release_milestone__if_end" />
<bpmn:sequenceFlow id="Flow_Task_release_milestone__Gateway_release_milestone__if_end" sourceRef="Task_release_milestone" targetRef="Gateway_release_milestone__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_request_invoice__if__Task_request_invoice" name="readiness: something_due (a line has quantity or milestone value to invoice, per its policy), billing_block (none set, v5), incomplete:* (the fields the type requires for billing, v5), billing_relevant (not a FREE_OF_CHARGE or CONS_FILL order, v5), deduction_within_remaining (no deposit deducted beyond what is left, v5)" 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_sales_order__if__Task_amend_sales_order" name="readiness: not_done, not_below_done (no line below what is delivered or invoiced), approver_not_amender (where amendment_needs_approval), delivery_multiple (v4, on changed lines), partners_unchanged_after_delivery (v5)" sourceRef="Gateway_amend_sales_order__if" targetRef="Task_amend_sales_order" />
<bpmn:sequenceFlow id="Flow_Gateway_amend_sales_order__if__Gateway_amend_sales_order__if_end" name="otherwise" sourceRef="Gateway_amend_sales_order__if" targetRef="Gateway_amend_sales_order__if_end" />
<bpmn:sequenceFlow id="Flow_Task_amend_sales_order__Gateway_amend_sales_order__if_end" sourceRef="Task_amend_sales_order" targetRef="Gateway_amend_sales_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_approve_memo_request__if" sourceRef="Task_receive_confirmation" targetRef="Gateway_approve_memo_request__if" />
<bpmn:sequenceFlow id="Flow_Gateway_approve_memo_request__if_end__Gateway_set_order_block__if" sourceRef="Gateway_approve_memo_request__if_end" targetRef="Gateway_set_order_block__if" />
<bpmn:sequenceFlow id="Flow_Gateway_set_order_block__if_end__Gateway_release_order_block__if" sourceRef="Gateway_set_order_block__if_end" targetRef="Gateway_release_order_block__if" />
<bpmn:sequenceFlow id="Flow_Gateway_release_order_block__if_end__Gateway_reschedule_order__if" sourceRef="Gateway_release_order_block__if_end" targetRef="Gateway_reschedule_order__if" />
<bpmn:sequenceFlow id="Flow_Gateway_reschedule_order__if_end__Gateway_raise_deposit__if" sourceRef="Gateway_reschedule_order__if_end" 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_inventory_delivers__if" sourceRef="Gateway_record_delivery__if_end" targetRef="Gateway_inventory_delivers__if" />
<bpmn:sequenceFlow id="Flow_Gateway_inventory_delivers__if_end__Gateway_supplier_delivers__if" sourceRef="Gateway_inventory_delivers__if_end" targetRef="Gateway_supplier_delivers__if" />
<bpmn:sequenceFlow id="Flow_Gateway_supplier_delivers__if_end__Gateway_release_milestone__if" sourceRef="Gateway_supplier_delivers__if_end" targetRef="Gateway_release_milestone__if" />
<bpmn:sequenceFlow id="Flow_Gateway_release_milestone__if_end__Gateway_request_invoice__if" sourceRef="Gateway_release_milestone__if_end" targetRef="Gateway_request_invoice__if" />
<bpmn:sequenceFlow id="Flow_Gateway_request_invoice__if_end__Gateway_amend_sales_order__if" sourceRef="Gateway_request_invoice__if_end" targetRef="Gateway_amend_sales_order__if" />
<bpmn:sequenceFlow id="Flow_Gateway_sales_order_confirmed__if__Task_finish_sales_order" sourceRef="Gateway_sales_order_confirmed__if" targetRef="Task_finish_sales_order" />
<bpmn:sequenceFlow id="Flow_Gateway_sales_order_confirmed__if__Task_cancel_sales_order" sourceRef="Gateway_sales_order_confirmed__if" targetRef="Task_cancel_sales_order" />
<bpmn:sequenceFlow id="Flow_Gateway_amend_sales_order__if_end__Gateway_sales_order_confirmed__if" sourceRef="Gateway_amend_sales_order__if_end" targetRef="Gateway_sales_order_confirmed__if" />
<bpmn:sequenceFlow id="Flow_Task_confirm_sales_order__Task_send_confirmation" sourceRef="Task_confirm_sales_order" targetRef="Task_send_confirmation" />
<bpmn:sequenceFlow id="Flow_Task_cancel_draft_order__End_sales_order_cancelled" sourceRef="Task_cancel_draft_order" targetRef="End_sales_order_cancelled" />
<bpmn:sequenceFlow id="Flow_Task_finish_sales_order__End_sales_order_done" sourceRef="Task_finish_sales_order" targetRef="End_sales_order_done" />
<bpmn:sequenceFlow id="Flow_Task_cancel_sales_order__End_sales_order_cancelled" sourceRef="Task_cancel_sales_order" targetRef="End_sales_order_cancelled" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_sales-order_v7">
<bpmndi:BPMNPlane id="BPMNPlane_sales-order_v7" bpmnElement="Collaboration_sales-order_v7">
<bpmndi:BPMNShape id="Participant_sales-order_sales_order_di" bpmnElement="Participant_sales-order_sales_order" isHorizontal="true">
<dc:Bounds x="0" y="0" width="7250" height="1820" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_sales_order_system_di" bpmnElement="Lane_sales_order_system" isHorizontal="true">
<dc:Bounds x="30" y="0" width="7220" 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="7220" 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="7220" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_sales_order_sales_controller_di" bpmnElement="Lane_sales_order_sales_controller" isHorizontal="true">
<dc:Bounds x="30" y="780" width="7220" 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="1040" width="7220" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_sales_order_biller_di" bpmnElement="Lane_sales_order_biller" isHorizontal="true">
<dc:Bounds x="30" y="1300" width="7220" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_sales_order_fulfiller_di" bpmnElement="Lane_sales_order_fulfiller" isHorizontal="true">
<dc:Bounds x="30" y="1560" width="7220" height="260" />
</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_order_suggestion_di" bpmnElement="Task_accept_order_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_price_order_di" bpmnElement="Task_price_order">
<dc:Bounds x="1655" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_promise_dates_di" bpmnElement="Task_promise_dates">
<dc:Bounds x="1995" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_review_order_di" bpmnElement="Task_review_order">
<dc:Bounds x="2165" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_confirm_sales_order_di" bpmnElement="Task_confirm_sales_order">
<dc:Bounds x="2505" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_cancel_draft_order_di" bpmnElement="Task_cancel_draft_order">
<dc:Bounds x="2505" y="400" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_send_confirmation_di" bpmnElement="Task_send_confirmation">
<dc:Bounds x="2675" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_receive_confirmation_di" bpmnElement="Task_receive_confirmation">
<dc:Bounds x="2845" y="540" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_approve_memo_request_di" bpmnElement="Task_approve_memo_request">
<dc:Bounds x="3185" y="800" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_set_order_block_di" bpmnElement="Task_set_order_block">
<dc:Bounds x="3525" y="1060" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_release_order_block_di" bpmnElement="Task_release_order_block">
<dc:Bounds x="3865" y="1060" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_reschedule_order_di" bpmnElement="Task_reschedule_order">
<dc:Bounds x="4205" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_raise_deposit_di" bpmnElement="Task_raise_deposit">
<dc:Bounds x="4545" y="1320" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_record_delivery_di" bpmnElement="Task_record_delivery">
<dc:Bounds x="4885" y="1580" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_inventory_delivers_di" bpmnElement="Task_inventory_delivers">
<dc:Bounds x="5225" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_supplier_delivers_di" bpmnElement="Task_supplier_delivers">
<dc:Bounds x="5565" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_release_milestone_di" bpmnElement="Task_release_milestone">
<dc:Bounds x="5905" y="1580" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_request_invoice_di" bpmnElement="Task_request_invoice">
<dc:Bounds x="6245" y="1320" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_amend_sales_order_di" bpmnElement="Task_amend_sales_order">
<dc:Bounds x="6585" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_finish_sales_order_di" bpmnElement="Task_finish_sales_order">
<dc:Bounds x="6925" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_cancel_sales_order_di" bpmnElement="Task_cancel_sales_order">
<dc:Bounds x="6925" y="1060" 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_price_order__if_di" bpmnElement="Gateway_price_order__if">
<dc:Bounds x="1510" y="295" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_price_order__if_end_di" bpmnElement="Gateway_price_order__if_end">
<dc:Bounds x="1680" y="415" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_promise_dates__if_di" bpmnElement="Gateway_promise_dates__if">
<dc:Bounds x="1850" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_promise_dates__if_end_di" bpmnElement="Gateway_promise_dates__if_end">
<dc:Bounds x="2020" 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="2360" y="295" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_approve_memo_request__if_di" bpmnElement="Gateway_approve_memo_request__if">
<dc:Bounds x="3040" y="815" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_approve_memo_request__if_end_di" bpmnElement="Gateway_approve_memo_request__if_end">
<dc:Bounds x="3210" y="935" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_set_order_block__if_di" bpmnElement="Gateway_set_order_block__if">
<dc:Bounds x="3380" y="1075" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_set_order_block__if_end_di" bpmnElement="Gateway_set_order_block__if_end">
<dc:Bounds x="3550" y="1195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_release_order_block__if_di" bpmnElement="Gateway_release_order_block__if">
<dc:Bounds x="3720" y="1075" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_release_order_block__if_end_di" bpmnElement="Gateway_release_order_block__if_end">
<dc:Bounds x="3890" y="1195" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_reschedule_order__if_di" bpmnElement="Gateway_reschedule_order__if">
<dc:Bounds x="4060" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_reschedule_order__if_end_di" bpmnElement="Gateway_reschedule_order__if_end">
<dc:Bounds x="4230" y="155" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_raise_deposit__if_di" bpmnElement="Gateway_raise_deposit__if">
<dc:Bounds x="4400" y="1335" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_raise_deposit__if_end_di" bpmnElement="Gateway_raise_deposit__if_end">
<dc:Bounds x="4570" y="1455" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_record_delivery__if_di" bpmnElement="Gateway_record_delivery__if">
<dc:Bounds x="4740" y="1595" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_record_delivery__if_end_di" bpmnElement="Gateway_record_delivery__if_end">
<dc:Bounds x="4910" y="1715" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_inventory_delivers__if_di" bpmnElement="Gateway_inventory_delivers__if">
<dc:Bounds x="5080" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_inventory_delivers__if_end_di" bpmnElement="Gateway_inventory_delivers__if_end">
<dc:Bounds x="5250" y="155" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_supplier_delivers__if_di" bpmnElement="Gateway_supplier_delivers__if">
<dc:Bounds x="5420" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_supplier_delivers__if_end_di" bpmnElement="Gateway_supplier_delivers__if_end">
<dc:Bounds x="5590" y="155" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_release_milestone__if_di" bpmnElement="Gateway_release_milestone__if">
<dc:Bounds x="5760" y="1595" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_release_milestone__if_end_di" bpmnElement="Gateway_release_milestone__if_end">
<dc:Bounds x="5930" y="1715" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_request_invoice__if_di" bpmnElement="Gateway_request_invoice__if">
<dc:Bounds x="6100" y="1335" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_request_invoice__if_end_di" bpmnElement="Gateway_request_invoice__if_end">
<dc:Bounds x="6270" y="1455" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_amend_sales_order__if_di" bpmnElement="Gateway_amend_sales_order__if">
<dc:Bounds x="6440" y="295" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_amend_sales_order__if_end_di" bpmnElement="Gateway_amend_sales_order__if_end">
<dc:Bounds x="6610" 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="6780" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_sales_order_cancelled_di" bpmnElement="End_sales_order_cancelled">
<dc:Bounds x="2707" y="422" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_sales_order_done_di" bpmnElement="End_sales_order_done">
<dc:Bounds x="7127" 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_Gateway_price_order__if__Task_price_order_di" bpmnElement="Flow_Gateway_price_order__if__Task_price_order">
<di:waypoint x="1560" y="320" />
<di:waypoint x="1655" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_price_order__if__Gateway_price_order__if_end_di" bpmnElement="Flow_Gateway_price_order__if__Gateway_price_order__if_end">
<di:waypoint x="1560" y="320" />
<di:waypoint x="1655" y="320" />
<di:waypoint x="1655" y="440" />
<di:waypoint x="1680" y="440" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_price_order__Gateway_price_order__if_end_di" bpmnElement="Flow_Task_price_order__Gateway_price_order__if_end">
<di:waypoint x="1705" y="360" />
<di:waypoint x="1705" y="492" />
<di:waypoint x="1705" y="492" />
<di:waypoint x="1705" y="465" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_promise_dates__if__Task_promise_dates_di" bpmnElement="Flow_Gateway_promise_dates__if__Task_promise_dates">
<di:waypoint x="1900" y="60" />
<di:waypoint x="1995" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_promise_dates__if__Gateway_promise_dates__if_end_di" bpmnElement="Flow_Gateway_promise_dates__if__Gateway_promise_dates__if_end">
<di:waypoint x="1900" y="60" />
<di:waypoint x="1995" y="60" />
<di:waypoint x="1995" y="180" />
<di:waypoint x="2020" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_promise_dates__Gateway_promise_dates__if_end_di" bpmnElement="Flow_Task_promise_dates__Gateway_promise_dates__if_end">
<di:waypoint x="2045" y="100" />
<di:waypoint x="2045" y="238" />
<di:waypoint x="2045" y="238" />
<di:waypoint x="2045" y="205" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_accept_order_suggestion__Gateway_customer_sends_po__if_di" bpmnElement="Flow_Task_accept_order_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__Gateway_price_order__if_di" bpmnElement="Flow_Gateway_ai_check_po__if_end__Gateway_price_order__if">
<di:waypoint x="1390" y="180" />
<di:waypoint x="1485" y="180" />
<di:waypoint x="1485" y="320" />
<di:waypoint x="1510" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_price_order__if_end__Gateway_promise_dates__if_di" bpmnElement="Flow_Gateway_price_order__if_end__Gateway_promise_dates__if">
<di:waypoint x="1730" y="440" />
<di:waypoint x="1825" y="440" />
<di:waypoint x="1825" y="60" />
<di:waypoint x="1850" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_promise_dates__if_end__Task_review_order_di" bpmnElement="Flow_Gateway_promise_dates__if_end__Task_review_order">
<di:waypoint x="2070" y="180" />
<di:waypoint x="2140" y="180" />
<di:waypoint x="2140" y="320" />
<di:waypoint x="2165" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_sales_order_draft__if__Task_confirm_sales_order_di" bpmnElement="Flow_Gateway_sales_order_draft__if__Task_confirm_sales_order">
<di:waypoint x="2410" y="320" />
<di:waypoint x="2505" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_sales_order_draft__if__Task_cancel_draft_order_di" bpmnElement="Flow_Gateway_sales_order_draft__if__Task_cancel_draft_order">
<di:waypoint x="2410" y="320" />
<di:waypoint x="2480" y="320" />
<di:waypoint x="2480" y="440" />
<di:waypoint x="2505" 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="2265" y="320" />
<di:waypoint x="2360" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_order_from_quote__Task_accept_order_suggestion_di" bpmnElement="Flow_Task_order_from_quote__Task_accept_order_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_order_suggestion_di" bpmnElement="Flow_Task_draft_by_hand__Task_accept_order_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_order_suggestion_di" bpmnElement="Flow_Task_ai_order_from_po__Task_accept_order_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_approve_memo_request__if__Task_approve_memo_request_di" bpmnElement="Flow_Gateway_approve_memo_request__if__Task_approve_memo_request">
<di:waypoint x="3090" y="840" />
<di:waypoint x="3185" y="840" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_approve_memo_request__if__Gateway_approve_memo_request__if_end_di" bpmnElement="Flow_Gateway_approve_memo_request__if__Gateway_approve_memo_request__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_approve_memo_request__Gateway_approve_memo_request__if_end_di" bpmnElement="Flow_Task_approve_memo_request__Gateway_approve_memo_request__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_set_order_block__if__Task_set_order_block_di" bpmnElement="Flow_Gateway_set_order_block__if__Task_set_order_block">
<di:waypoint x="3430" y="1100" />
<di:waypoint x="3525" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_set_order_block__if__Gateway_set_order_block__if_end_di" bpmnElement="Flow_Gateway_set_order_block__if__Gateway_set_order_block__if_end">
<di:waypoint x="3430" y="1100" />
<di:waypoint x="3525" y="1100" />
<di:waypoint x="3525" y="1220" />
<di:waypoint x="3550" y="1220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_set_order_block__Gateway_set_order_block__if_end_di" bpmnElement="Flow_Task_set_order_block__Gateway_set_order_block__if_end">
<di:waypoint x="3575" y="1140" />
<di:waypoint x="3575" y="1266" />
<di:waypoint x="3575" y="1266" />
<di:waypoint x="3575" y="1245" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_release_order_block__if__Task_release_order_block_di" bpmnElement="Flow_Gateway_release_order_block__if__Task_release_order_block">
<di:waypoint x="3770" y="1100" />
<di:waypoint x="3865" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_release_order_block__if__Gateway_release_order_block__if_end_di" bpmnElement="Flow_Gateway_release_order_block__if__Gateway_release_order_block__if_end">
<di:waypoint x="3770" y="1100" />
<di:waypoint x="3865" y="1100" />
<di:waypoint x="3865" y="1220" />
<di:waypoint x="3890" y="1220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_release_order_block__Gateway_release_order_block__if_end_di" bpmnElement="Flow_Task_release_order_block__Gateway_release_order_block__if_end">
<di:waypoint x="3915" y="1140" />
<di:waypoint x="3915" y="1272" />
<di:waypoint x="3915" y="1272" />
<di:waypoint x="3915" y="1245" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_reschedule_order__if__Task_reschedule_order_di" bpmnElement="Flow_Gateway_reschedule_order__if__Task_reschedule_order">
<di:waypoint x="4110" y="60" />
<di:waypoint x="4205" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_reschedule_order__if__Gateway_reschedule_order__if_end_di" bpmnElement="Flow_Gateway_reschedule_order__if__Gateway_reschedule_order__if_end">
<di:waypoint x="4110" y="60" />
<di:waypoint x="4205" y="60" />
<di:waypoint x="4205" y="180" />
<di:waypoint x="4230" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_reschedule_order__Gateway_reschedule_order__if_end_di" bpmnElement="Flow_Task_reschedule_order__Gateway_reschedule_order__if_end">
<di:waypoint x="4255" y="100" />
<di:waypoint x="4255" y="238" />
<di:waypoint x="4255" y="238" />
<di:waypoint x="4255" y="205" />
</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="4450" y="1360" />
<di:waypoint x="4545" y="1360" />
</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="4450" y="1360" />
<di:waypoint x="4545" y="1360" />
<di:waypoint x="4545" y="1480" />
<di:waypoint x="4570" y="1480" />
</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="4595" y="1400" />
<di:waypoint x="4595" y="1520" />
<di:waypoint x="4595" y="1520" />
<di:waypoint x="4595" y="1505" />
</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="4790" y="1620" />
<di:waypoint x="4885" y="1620" />
</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="4790" y="1620" />
<di:waypoint x="4885" y="1620" />
<di:waypoint x="4885" y="1740" />
<di:waypoint x="4910" y="1740" />
</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="4935" y="1660" />
<di:waypoint x="4935" y="1786" />
<di:waypoint x="4935" y="1786" />
<di:waypoint x="4935" y="1765" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_inventory_delivers__if__Task_inventory_delivers_di" bpmnElement="Flow_Gateway_inventory_delivers__if__Task_inventory_delivers">
<di:waypoint x="5130" y="60" />
<di:waypoint x="5225" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_inventory_delivers__if__Gateway_inventory_delivers__if_end_di" bpmnElement="Flow_Gateway_inventory_delivers__if__Gateway_inventory_delivers__if_end">
<di:waypoint x="5130" y="60" />
<di:waypoint x="5225" y="60" />
<di:waypoint x="5225" y="180" />
<di:waypoint x="5250" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_inventory_delivers__Gateway_inventory_delivers__if_end_di" bpmnElement="Flow_Task_inventory_delivers__Gateway_inventory_delivers__if_end">
<di:waypoint x="5275" y="100" />
<di:waypoint x="5275" y="232" />
<di:waypoint x="5275" y="232" />
<di:waypoint x="5275" y="205" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_supplier_delivers__if__Task_supplier_delivers_di" bpmnElement="Flow_Gateway_supplier_delivers__if__Task_supplier_delivers">
<di:waypoint x="5470" y="60" />
<di:waypoint x="5565" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_supplier_delivers__if__Gateway_supplier_delivers__if_end_di" bpmnElement="Flow_Gateway_supplier_delivers__if__Gateway_supplier_delivers__if_end">
<di:waypoint x="5470" y="60" />
<di:waypoint x="5565" y="60" />
<di:waypoint x="5565" y="180" />
<di:waypoint x="5590" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_supplier_delivers__Gateway_supplier_delivers__if_end_di" bpmnElement="Flow_Task_supplier_delivers__Gateway_supplier_delivers__if_end">
<di:waypoint x="5615" y="100" />
<di:waypoint x="5615" y="238" />
<di:waypoint x="5615" y="238" />
<di:waypoint x="5615" y="205" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_release_milestone__if__Task_release_milestone_di" bpmnElement="Flow_Gateway_release_milestone__if__Task_release_milestone">
<di:waypoint x="5810" y="1620" />
<di:waypoint x="5905" y="1620" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_release_milestone__if__Gateway_release_milestone__if_end_di" bpmnElement="Flow_Gateway_release_milestone__if__Gateway_release_milestone__if_end">
<di:waypoint x="5810" y="1620" />
<di:waypoint x="5905" y="1620" />
<di:waypoint x="5905" y="1740" />
<di:waypoint x="5930" y="1740" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_release_milestone__Gateway_release_milestone__if_end_di" bpmnElement="Flow_Task_release_milestone__Gateway_release_milestone__if_end">
<di:waypoint x="5955" y="1660" />
<di:waypoint x="5955" y="1780" />
<di:waypoint x="5955" y="1780" />
<di:waypoint x="5955" y="1765" />
</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="6150" y="1360" />
<di:waypoint x="6245" y="1360" />
</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="6150" y="1360" />
<di:waypoint x="6245" y="1360" />
<di:waypoint x="6245" y="1480" />
<di:waypoint x="6270" y="1480" />
</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="6295" y="1400" />
<di:waypoint x="6295" y="1526" />
<di:waypoint x="6295" y="1526" />
<di:waypoint x="6295" y="1505" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_amend_sales_order__if__Task_amend_sales_order_di" bpmnElement="Flow_Gateway_amend_sales_order__if__Task_amend_sales_order">
<di:waypoint x="6490" y="320" />
<di:waypoint x="6585" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_amend_sales_order__if__Gateway_amend_sales_order__if_end_di" bpmnElement="Flow_Gateway_amend_sales_order__if__Gateway_amend_sales_order__if_end">
<di:waypoint x="6490" y="320" />
<di:waypoint x="6585" y="320" />
<di:waypoint x="6585" y="440" />
<di:waypoint x="6610" y="440" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_amend_sales_order__Gateway_amend_sales_order__if_end_di" bpmnElement="Flow_Task_amend_sales_order__Gateway_amend_sales_order__if_end">
<di:waypoint x="6635" y="360" />
<di:waypoint x="6635" y="492" />
<di:waypoint x="6635" y="492" />
<di:waypoint x="6635" 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="2775" y="320" />
<di:waypoint x="2820" y="320" />
<di:waypoint x="2820" y="580" />
<di:waypoint x="2845" y="580" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_receive_confirmation__Gateway_approve_memo_request__if_di" bpmnElement="Flow_Task_receive_confirmation__Gateway_approve_memo_request__if">
<di:waypoint x="2945" y="580" />
<di:waypoint x="3015" y="580" />
<di:waypoint x="3015" y="840" />
<di:waypoint x="3040" y="840" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_approve_memo_request__if_end__Gateway_set_order_block__if_di" bpmnElement="Flow_Gateway_approve_memo_request__if_end__Gateway_set_order_block__if">
<di:waypoint x="3260" y="960" />
<di:waypoint x="3355" y="960" />
<di:waypoint x="3355" y="1100" />
<di:waypoint x="3380" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_set_order_block__if_end__Gateway_release_order_block__if_di" bpmnElement="Flow_Gateway_set_order_block__if_end__Gateway_release_order_block__if">
<di:waypoint x="3600" y="1220" />
<di:waypoint x="3695" y="1220" />
<di:waypoint x="3695" y="1100" />
<di:waypoint x="3720" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_release_order_block__if_end__Gateway_reschedule_order__if_di" bpmnElement="Flow_Gateway_release_order_block__if_end__Gateway_reschedule_order__if">
<di:waypoint x="3940" y="1220" />
<di:waypoint x="4035" y="1220" />
<di:waypoint x="4035" y="60" />
<di:waypoint x="4060" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_reschedule_order__if_end__Gateway_raise_deposit__if_di" bpmnElement="Flow_Gateway_reschedule_order__if_end__Gateway_raise_deposit__if">
<di:waypoint x="4280" y="180" />
<di:waypoint x="4375" y="180" />
<di:waypoint x="4375" y="1360" />
<di:waypoint x="4400" y="1360" />
</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="4620" y="1480" />
<di:waypoint x="4715" y="1480" />
<di:waypoint x="4715" y="1620" />
<di:waypoint x="4740" y="1620" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_record_delivery__if_end__Gateway_inventory_delivers__if_di" bpmnElement="Flow_Gateway_record_delivery__if_end__Gateway_inventory_delivers__if">
<di:waypoint x="4960" y="1740" />
<di:waypoint x="5055" y="1740" />
<di:waypoint x="5055" y="60" />
<di:waypoint x="5080" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_inventory_delivers__if_end__Gateway_supplier_delivers__if_di" bpmnElement="Flow_Gateway_inventory_delivers__if_end__Gateway_supplier_delivers__if">
<di:waypoint x="5300" y="180" />
<di:waypoint x="5395" y="180" />
<di:waypoint x="5395" y="60" />
<di:waypoint x="5420" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_supplier_delivers__if_end__Gateway_release_milestone__if_di" bpmnElement="Flow_Gateway_supplier_delivers__if_end__Gateway_release_milestone__if">
<di:waypoint x="5640" y="180" />
<di:waypoint x="5735" y="180" />
<di:waypoint x="5735" y="1620" />
<di:waypoint x="5760" y="1620" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_release_milestone__if_end__Gateway_request_invoice__if_di" bpmnElement="Flow_Gateway_release_milestone__if_end__Gateway_request_invoice__if">
<di:waypoint x="5980" y="1740" />
<di:waypoint x="6075" y="1740" />
<di:waypoint x="6075" y="1360" />
<di:waypoint x="6100" y="1360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_request_invoice__if_end__Gateway_amend_sales_order__if_di" bpmnElement="Flow_Gateway_request_invoice__if_end__Gateway_amend_sales_order__if">
<di:waypoint x="6320" y="1480" />
<di:waypoint x="6415" y="1480" />
<di:waypoint x="6415" y="320" />
<di:waypoint x="6440" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_sales_order_confirmed__if__Task_finish_sales_order_di" bpmnElement="Flow_Gateway_sales_order_confirmed__if__Task_finish_sales_order">
<di:waypoint x="6830" y="60" />
<di:waypoint x="6925" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_sales_order_confirmed__if__Task_cancel_sales_order_di" bpmnElement="Flow_Gateway_sales_order_confirmed__if__Task_cancel_sales_order">
<di:waypoint x="6830" y="60" />
<di:waypoint x="6900" y="60" />
<di:waypoint x="6900" y="1100" />
<di:waypoint x="6925" y="1100" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_amend_sales_order__if_end__Gateway_sales_order_confirmed__if_di" bpmnElement="Flow_Gateway_amend_sales_order__if_end__Gateway_sales_order_confirmed__if">
<di:waypoint x="6660" y="440" />
<di:waypoint x="6755" y="440" />
<di:waypoint x="6755" y="60" />
<di:waypoint x="6780" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_confirm_sales_order__Task_send_confirmation_di" bpmnElement="Flow_Task_confirm_sales_order__Task_send_confirmation">
<di:waypoint x="2605" y="320" />
<di:waypoint x="2675" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_cancel_draft_order__End_sales_order_cancelled_di" bpmnElement="Flow_Task_cancel_draft_order__End_sales_order_cancelled">
<di:waypoint x="2605" y="440" />
<di:waypoint x="2707" y="440" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_finish_sales_order__End_sales_order_done_di" bpmnElement="Flow_Task_finish_sales_order__End_sales_order_done">
<di:waypoint x="7025" y="60" />
<di:waypoint x="7127" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_cancel_sales_order__End_sales_order_cancelled_di" bpmnElement="Flow_Task_cancel_sales_order__End_sales_order_cancelled">
<di:waypoint x="6975" y="1140" />
<di:waypoint x="6975" y="1173" />
<di:waypoint x="2725" y="1173" />
<di:waypoint x="2725" y="458" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_customer_di" bpmnElement="Participant_customer" isHorizontal="true">
<dc:Bounds x="0" y="1860" width="7250" 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="1860" />
<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="2895" y="1860" />
<di:waypoint x="2895" y="620" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>