<?xml version='1.0' encoding='utf-8'?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="quote_definitions" targetNamespace="https://victorlipov.com/examples/quote">
  <bpmn:process id="quote_process" name="Illustrative enquiry to approved quote" isExecutable="false">
    <bpmn:laneSet id="lanes">
      <bpmn:lane id="lane_customer" name="Customer">
        <bpmn:flowNodeRef>reply</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="lane_system" name="System">
        <bpmn:flowNodeRef>start</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>extract</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>extracted</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>validate</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>complete</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>price</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>deliver</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>delivered</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>end</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="lane_owner" name="Business owner">
        <bpmn:flowNodeRef>capture</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>use_ai</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>manual</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>clarify</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>review</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>approved</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>revise</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>resolve</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="start" name="Enquiry received">
      <bpmn:outgoing>flow_0</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="capture" name="Capture source">
      <bpmn:incoming>flow_0</bpmn:incoming>
      <bpmn:outgoing>flow_1</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="use_ai" name="Use AI draft?">
      <bpmn:incoming>flow_1</bpmn:incoming>
      <bpmn:outgoing>flow_20</bpmn:outgoing>
      <bpmn:outgoing>flow_21</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="extract" name="Extract draft">
      <bpmn:outgoing>flow_2</bpmn:outgoing>
      <bpmn:incoming>flow_20</bpmn:incoming>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="extracted" name="Draft available?">
      <bpmn:incoming>flow_2</bpmn:incoming>
      <bpmn:outgoing>flow_3</bpmn:outgoing>
      <bpmn:outgoing>flow_4</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="manual" name="Enter facts manually">
      <bpmn:incoming>flow_4</bpmn:incoming>
      <bpmn:outgoing>flow_5</bpmn:outgoing>
      <bpmn:incoming>flow_21</bpmn:incoming>
    </bpmn:userTask>
    <bpmn:serviceTask id="validate" name="Validate required fields">
      <bpmn:incoming>flow_3</bpmn:incoming>
      <bpmn:incoming>flow_5</bpmn:incoming>
      <bpmn:outgoing>flow_6</bpmn:outgoing>
      <bpmn:incoming>flow_10</bpmn:incoming>
      <bpmn:incoming>flow_14</bpmn:incoming>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="complete" name="Complete?">
      <bpmn:incoming>flow_6</bpmn:incoming>
      <bpmn:outgoing>flow_7</bpmn:outgoing>
      <bpmn:outgoing>flow_8</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="clarify" name="Review &amp; send questions">
      <bpmn:incoming>flow_8</bpmn:incoming>
      <bpmn:outgoing>flow_9</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:userTask id="reply" name="Provide missing details">
      <bpmn:incoming>flow_9</bpmn:incoming>
      <bpmn:outgoing>flow_10</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="price" name="Price from catalogue">
      <bpmn:incoming>flow_7</bpmn:incoming>
      <bpmn:outgoing>flow_11</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:userTask id="review" name="Review quote revision">
      <bpmn:incoming>flow_11</bpmn:incoming>
      <bpmn:outgoing>flow_12</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="approved" name="Approved?">
      <bpmn:incoming>flow_12</bpmn:incoming>
      <bpmn:outgoing>flow_13</bpmn:outgoing>
      <bpmn:outgoing>flow_15</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="revise" name="Revise quote">
      <bpmn:incoming>flow_13</bpmn:incoming>
      <bpmn:outgoing>flow_14</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="deliver" name="Deliver &amp; log approved quote">
      <bpmn:incoming>flow_15</bpmn:incoming>
      <bpmn:outgoing>flow_16</bpmn:outgoing>
      <bpmn:incoming>flow_19</bpmn:incoming>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="delivered" name="Delivery confirmed?">
      <bpmn:incoming>flow_16</bpmn:incoming>
      <bpmn:outgoing>flow_17</bpmn:outgoing>
      <bpmn:outgoing>flow_18</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="resolve" name="Resolve failure / reconcile">
      <bpmn:incoming>flow_18</bpmn:incoming>
      <bpmn:outgoing>flow_19</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:endEvent id="end" name="Quote delivered">
      <bpmn:incoming>flow_17</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="flow_0" sourceRef="start" targetRef="capture" />
    <bpmn:sequenceFlow id="flow_1" sourceRef="capture" targetRef="use_ai" />
    <bpmn:sequenceFlow id="flow_2" sourceRef="extract" targetRef="extracted" />
    <bpmn:sequenceFlow id="flow_3" sourceRef="extracted" targetRef="validate" name="Yes" />
    <bpmn:sequenceFlow id="flow_4" sourceRef="extracted" targetRef="manual" name="No / failed" />
    <bpmn:sequenceFlow id="flow_5" sourceRef="manual" targetRef="validate" />
    <bpmn:sequenceFlow id="flow_6" sourceRef="validate" targetRef="complete" />
    <bpmn:sequenceFlow id="flow_7" sourceRef="complete" targetRef="price" name="Yes" />
    <bpmn:sequenceFlow id="flow_8" sourceRef="complete" targetRef="clarify" name="No" />
    <bpmn:sequenceFlow id="flow_9" sourceRef="clarify" targetRef="reply" />
    <bpmn:sequenceFlow id="flow_10" sourceRef="reply" targetRef="validate" name="Update record" />
    <bpmn:sequenceFlow id="flow_11" sourceRef="price" targetRef="review" />
    <bpmn:sequenceFlow id="flow_12" sourceRef="review" targetRef="approved" />
    <bpmn:sequenceFlow id="flow_13" sourceRef="approved" targetRef="revise" name="No" />
    <bpmn:sequenceFlow id="flow_14" sourceRef="revise" targetRef="validate" name="Revalidate" />
    <bpmn:sequenceFlow id="flow_15" sourceRef="approved" targetRef="deliver" name="Yes" />
    <bpmn:sequenceFlow id="flow_16" sourceRef="deliver" targetRef="delivered" />
    <bpmn:sequenceFlow id="flow_17" sourceRef="delivered" targetRef="end" name="Yes" />
    <bpmn:sequenceFlow id="flow_18" sourceRef="delivered" targetRef="resolve" name="No / unknown" />
    <bpmn:sequenceFlow id="flow_19" sourceRef="resolve" targetRef="deliver" name="Safe retry" />
    <bpmn:sequenceFlow id="flow_20" sourceRef="use_ai" targetRef="extract" name="Yes" />
    <bpmn:sequenceFlow id="flow_21" sourceRef="use_ai" targetRef="manual" name="Manual" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="diagram">
    <bpmndi:BPMNPlane id="plane" bpmnElement="quote_process">
      <bpmndi:BPMNShape id="shape_lane_customer" bpmnElement="lane_customer" isHorizontal="true">
        <dc:Bounds x="40" y="100" width="2100" height="145" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_lane_system" bpmnElement="lane_system" isHorizontal="true">
        <dc:Bounds x="40" y="245" width="2100" height="355" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_lane_owner" bpmnElement="lane_owner" isHorizontal="true">
        <dc:Bounds x="40" y="600" width="2100" height="300" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_start" bpmnElement="start">
        <dc:Bounds x="110" y="374" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_capture" bpmnElement="capture">
        <dc:Bounds x="190" y="675" width="130" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_use_ai" bpmnElement="use_ai">
        <dc:Bounds x="365" y="682" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_extract" bpmnElement="extract">
        <dc:Bounds x="365" y="360" width="130" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_extracted" bpmnElement="extracted">
        <dc:Bounds x="550" y="367" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_manual" bpmnElement="manual">
        <dc:Bounds x="530" y="675" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_validate" bpmnElement="validate">
        <dc:Bounds x="735" y="360" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_complete" bpmnElement="complete">
        <dc:Bounds x="940" y="367" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_clarify" bpmnElement="clarify">
        <dc:Bounds x="895" y="675" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_reply" bpmnElement="reply">
        <dc:Bounds x="1060" y="150" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_price" bpmnElement="price">
        <dc:Bounds x="1090" y="360" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_review" bpmnElement="review">
        <dc:Bounds x="1270" y="675" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_approved" bpmnElement="approved">
        <dc:Bounds x="1470" y="682" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_revise" bpmnElement="revise">
        <dc:Bounds x="1265" y="800" width="145" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_deliver" bpmnElement="deliver">
        <dc:Bounds x="1610" y="360" width="155" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_delivered" bpmnElement="delivered">
        <dc:Bounds x="1820" y="367" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_resolve" bpmnElement="resolve">
        <dc:Bounds x="1770" y="675" width="155" height="65" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape_end" bpmnElement="end">
        <dc:Bounds x="2030" y="374" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge_0" bpmnElement="flow_0">
        <di:waypoint x="128" y="410" />
        <di:waypoint x="128" y="707" />
        <di:waypoint x="190" y="707" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_1" bpmnElement="flow_1">
        <di:waypoint x="320" y="707" />
        <di:waypoint x="365" y="707" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_2" bpmnElement="flow_2">
        <di:waypoint x="495" y="392" />
        <di:waypoint x="550" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_3" bpmnElement="flow_3">
        <di:waypoint x="600" y="392" />
        <di:waypoint x="735" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_4" bpmnElement="flow_4">
        <di:waypoint x="575" y="417" />
        <di:waypoint x="575" y="675" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_5" bpmnElement="flow_5">
        <di:waypoint x="675" y="707" />
        <di:waypoint x="700" y="707" />
        <di:waypoint x="700" y="392" />
        <di:waypoint x="735" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_6" bpmnElement="flow_6">
        <di:waypoint x="880" y="392" />
        <di:waypoint x="940" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_7" bpmnElement="flow_7">
        <di:waypoint x="990" y="392" />
        <di:waypoint x="1090" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_8" bpmnElement="flow_8">
        <di:waypoint x="965" y="417" />
        <di:waypoint x="965" y="675" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_9" bpmnElement="flow_9">
        <di:waypoint x="1040" y="707" />
        <di:waypoint x="1050" y="707" />
        <di:waypoint x="1050" y="182" />
        <di:waypoint x="1060" y="182" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_10" bpmnElement="flow_10">
        <di:waypoint x="1132" y="150" />
        <di:waypoint x="1132" y="120" />
        <di:waypoint x="807" y="120" />
        <di:waypoint x="807" y="360" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_11" bpmnElement="flow_11">
        <di:waypoint x="1235" y="392" />
        <di:waypoint x="1342" y="392" />
        <di:waypoint x="1342" y="675" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_12" bpmnElement="flow_12">
        <di:waypoint x="1415" y="707" />
        <di:waypoint x="1470" y="707" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_13" bpmnElement="flow_13">
        <di:waypoint x="1495" y="732" />
        <di:waypoint x="1495" y="832" />
        <di:waypoint x="1410" y="832" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_14" bpmnElement="flow_14">
        <di:waypoint x="1265" y="832" />
        <di:waypoint x="1248" y="832" />
        <di:waypoint x="1248" y="510" />
        <di:waypoint x="807" y="510" />
        <di:waypoint x="807" y="425" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_15" bpmnElement="flow_15">
        <di:waypoint x="1520" y="707" />
        <di:waypoint x="1570" y="707" />
        <di:waypoint x="1570" y="392" />
        <di:waypoint x="1610" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_16" bpmnElement="flow_16">
        <di:waypoint x="1765" y="392" />
        <di:waypoint x="1820" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_17" bpmnElement="flow_17">
        <di:waypoint x="1870" y="392" />
        <di:waypoint x="2030" y="392" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_18" bpmnElement="flow_18">
        <di:waypoint x="1845" y="417" />
        <di:waypoint x="1845" y="675" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_19" bpmnElement="flow_19">
        <di:waypoint x="1770" y="707" />
        <di:waypoint x="1687" y="707" />
        <di:waypoint x="1687" y="425" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_20" bpmnElement="flow_20">
        <di:waypoint x="390" y="682" />
        <di:waypoint x="390" y="425" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_21" bpmnElement="flow_21">
        <di:waypoint x="415" y="707" />
        <di:waypoint x="530" y="707" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>