<?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" id="Definitions_purchase-request" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:collaboration id="Collaboration_purchase-request">
    <bpmn:participant id="Participant_purchase-request" name="Purchase Request" processRef="Process_purchase-request" />
  </bpmn:collaboration>
  <bpmn:process id="Process_purchase-request" name="Purchase Request" isExecutable="true">
    <bpmn:laneSet id="LaneSet_purchase-request">
      <bpmn:lane id="Lane_1" name="Requester"><bpmn:flowNodeRef>Start</bpmn:flowNodeRef><bpmn:flowNodeRef>Receive</bpmn:flowNodeRef><bpmn:flowNodeRef>Join</bpmn:flowNodeRef><bpmn:flowNodeRef>Notify</bpmn:flowNodeRef><bpmn:flowNodeRef>End</bpmn:flowNodeRef><bpmn:flowNodeRef>Escalated</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_2" name="Procurement"><bpmn:flowNodeRef>Check</bpmn:flowNodeRef><bpmn:flowNodeRef>Amount</bpmn:flowNodeRef><bpmn:flowNodeRef>Merge</bpmn:flowNodeRef><bpmn:flowNodeRef>Order</bpmn:flowNodeRef><bpmn:flowNodeRef>Split</bpmn:flowNodeRef><bpmn:flowNodeRef>EndCancelled</bpmn:flowNodeRef><bpmn:flowNodeRef>Chase</bpmn:flowNodeRef><bpmn:flowNodeRef>EndChased</bpmn:flowNodeRef><bpmn:flowNodeRef>Cancelled</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_3" name="Budget Owner"><bpmn:flowNodeRef>Approve</bpmn:flowNodeRef><bpmn:flowNodeRef>EndDeclined</bpmn:flowNodeRef><bpmn:flowNodeRef>Remind</bpmn:flowNodeRef><bpmn:flowNodeRef>Declined</bpmn:flowNodeRef><bpmn:flowNodeRef>Timer</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_4" name="Finance"><bpmn:flowNodeRef>Invoice</bpmn:flowNodeRef></bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="Start" name="Purchase requested"><bpmn:outgoing>Flow_1</bpmn:outgoing></bpmn:startEvent>
    <bpmn:userTask id="Check" name="Check the request"><bpmn:incoming>Flow_1</bpmn:incoming><bpmn:outgoing>Flow_2</bpmn:outgoing></bpmn:userTask>
    <bpmn:exclusiveGateway id="Amount" name="Amount above 1,000?" default="Flow_4"><bpmn:incoming>Flow_2</bpmn:incoming><bpmn:outgoing>Flow_3</bpmn:outgoing><bpmn:outgoing>Flow_4</bpmn:outgoing></bpmn:exclusiveGateway>
    <bpmn:userTask id="Approve" name="Approve the purchase"><bpmn:incoming>Flow_3</bpmn:incoming><bpmn:outgoing>Flow_5</bpmn:outgoing></bpmn:userTask>
    <bpmn:exclusiveGateway id="Merge"><bpmn:incoming>Flow_4</bpmn:incoming><bpmn:incoming>Flow_5</bpmn:incoming><bpmn:outgoing>Flow_6</bpmn:outgoing></bpmn:exclusiveGateway>
    <bpmn:userTask id="Order" name="Place the order"><bpmn:incoming>Flow_6</bpmn:incoming><bpmn:outgoing>Flow_7</bpmn:outgoing></bpmn:userTask>
    <bpmn:parallelGateway id="Split"><bpmn:incoming>Flow_7</bpmn:incoming><bpmn:outgoing>Flow_8</bpmn:outgoing><bpmn:outgoing>Flow_9</bpmn:outgoing></bpmn:parallelGateway>
    <bpmn:userTask id="Receive" name="Receive and check the goods"><bpmn:incoming>Flow_8</bpmn:incoming><bpmn:outgoing>Flow_15</bpmn:outgoing></bpmn:userTask>
    <bpmn:callActivity id="Invoice" name="Process the invoice"><bpmn:incoming>Flow_9</bpmn:incoming><bpmn:outgoing>Flow_16</bpmn:outgoing></bpmn:callActivity>
    <bpmn:endEvent id="EndCancelled" name="Request cancelled"><bpmn:incoming>Flow_10</bpmn:incoming></bpmn:endEvent>
    <bpmn:endEvent id="EndDeclined" name="Request declined"><bpmn:incoming>Flow_11</bpmn:incoming></bpmn:endEvent>
    <bpmn:intermediateThrowEvent id="Remind" name="Remind the approver"><bpmn:incoming>Flow_12</bpmn:incoming><bpmn:messageEventDefinition /></bpmn:intermediateThrowEvent>
    <bpmn:userTask id="Chase" name="Chase the supplier"><bpmn:incoming>Flow_13</bpmn:incoming><bpmn:outgoing>Flow_14</bpmn:outgoing></bpmn:userTask>
    <bpmn:endEvent id="EndChased" name="Delivery clarified"><bpmn:incoming>Flow_14</bpmn:incoming></bpmn:endEvent>
    <bpmn:parallelGateway id="Join"><bpmn:incoming>Flow_15</bpmn:incoming><bpmn:incoming>Flow_16</bpmn:incoming><bpmn:outgoing>Flow_17</bpmn:outgoing></bpmn:parallelGateway>
    <bpmn:intermediateThrowEvent id="Notify" name="Notify the requester"><bpmn:incoming>Flow_17</bpmn:incoming><bpmn:outgoing>Flow_18</bpmn:outgoing><bpmn:messageEventDefinition /></bpmn:intermediateThrowEvent>
    <bpmn:endEvent id="End" name="Purchase completed"><bpmn:incoming>Flow_18</bpmn:incoming></bpmn:endEvent>
    <bpmn:boundaryEvent id="Cancelled" name="Cancelled" attachedToRef="Check"><bpmn:outgoing>Flow_10</bpmn:outgoing><bpmn:errorEventDefinition errorRef="Error_Cancelled" /></bpmn:boundaryEvent>
    <bpmn:boundaryEvent id="Declined" name="Declined" attachedToRef="Approve"><bpmn:outgoing>Flow_11</bpmn:outgoing><bpmn:conditionalEventDefinition><bpmn:condition xsi:type="bpmn:tFormalExpression">${cur.fields.resolution.name == 'Declined'}</bpmn:condition></bpmn:conditionalEventDefinition></bpmn:boundaryEvent>
    <bpmn:boundaryEvent id="Timer" name="3 days" attachedToRef="Approve" cancelActivity="false"><bpmn:outgoing>Flow_12</bpmn:outgoing><bpmn:timerEventDefinition><bpmn:timeDuration xsi:type="bpmn:tFormalExpression">P3D</bpmn:timeDuration></bpmn:timerEventDefinition></bpmn:boundaryEvent>
    <bpmn:boundaryEvent id="Escalated" name="Escalated" attachedToRef="Receive" cancelActivity="false"><bpmn:outgoing>Flow_13</bpmn:outgoing><bpmn:escalationEventDefinition escalationRef="Escalation_Escalated" /></bpmn:boundaryEvent>
    <bpmn:sequenceFlow id="Flow_1" sourceRef="Start" targetRef="Check" />
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Check" targetRef="Amount" />
    <bpmn:sequenceFlow id="Flow_3" name="Yes" sourceRef="Amount" targetRef="Approve"><bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pi.fields.customfield_10113 &gt; 1000}</bpmn:conditionExpression></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_4" name="No" sourceRef="Amount" targetRef="Merge" />
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Approve" targetRef="Merge" />
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Merge" targetRef="Order" />
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Order" targetRef="Split" />
    <bpmn:sequenceFlow id="Flow_8" sourceRef="Split" targetRef="Receive" />
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Split" targetRef="Invoice" />
    <bpmn:sequenceFlow id="Flow_10" sourceRef="Cancelled" targetRef="EndCancelled" />
    <bpmn:sequenceFlow id="Flow_11" sourceRef="Declined" targetRef="EndDeclined" />
    <bpmn:sequenceFlow id="Flow_12" sourceRef="Timer" targetRef="Remind" />
    <bpmn:sequenceFlow id="Flow_13" sourceRef="Escalated" targetRef="Chase" />
    <bpmn:sequenceFlow id="Flow_14" sourceRef="Chase" targetRef="EndChased" />
    <bpmn:sequenceFlow id="Flow_15" sourceRef="Receive" targetRef="Join" />
    <bpmn:sequenceFlow id="Flow_16" sourceRef="Invoice" targetRef="Join" />
    <bpmn:sequenceFlow id="Flow_17" sourceRef="Join" targetRef="Notify" />
    <bpmn:sequenceFlow id="Flow_18" sourceRef="Notify" targetRef="End" />
  </bpmn:process>
  <bpmn:error id="Error_Cancelled" name="Cancelled" errorCode="Cancelled" />
  <bpmn:escalation id="Escalation_Escalated" name="Escalated" escalationCode="Escalated" />
  <bpmndi:BPMNDiagram id="Diagram_purchase-request">
    <bpmndi:BPMNPlane id="Plane_purchase-request" bpmnElement="Collaboration_purchase-request">
      <bpmndi:BPMNShape id="Participant_purchase-request_di" bpmnElement="Participant_purchase-request" isHorizontal="true"><dc:Bounds x="160" y="80" width="2260" height="720" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1_di" bpmnElement="Lane_1" isHorizontal="true"><dc:Bounds x="190" y="80" width="2230" height="180" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_2_di" bpmnElement="Lane_2" isHorizontal="true"><dc:Bounds x="190" y="260" width="2230" height="180" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_3_di" bpmnElement="Lane_3" isHorizontal="true"><dc:Bounds x="190" y="440" width="2230" height="180" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_4_di" bpmnElement="Lane_4" isHorizontal="true"><dc:Bounds x="190" y="620" width="2230" height="180" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Start_di" bpmnElement="Start"><dc:Bounds x="272" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="245" y="100" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Check_di" bpmnElement="Check"><dc:Bounds x="395" y="290" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Amount_di" bpmnElement="Amount" isMarkerVisible="true"><dc:Bounds x="625" y="305" width="50" height="50" /><bpmndi:BPMNLabel><dc:Bounds x="605" y="273" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Approve_di" bpmnElement="Approve"><dc:Bounds x="755" y="470" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Merge_di" bpmnElement="Merge" isMarkerVisible="true"><dc:Bounds x="985" y="305" width="50" height="50" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Order_di" bpmnElement="Order"><dc:Bounds x="1115" y="290" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Split_di" bpmnElement="Split"><dc:Bounds x="1345" y="305" width="50" height="50" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Receive_di" bpmnElement="Receive"><dc:Bounds x="1475" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Invoice_di" bpmnElement="Invoice"><dc:Bounds x="1475" y="650" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndCancelled_di" bpmnElement="EndCancelled"><dc:Bounds x="514" y="387" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="535" y="392" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndDeclined_di" bpmnElement="EndDeclined"><dc:Bounds x="702" y="567" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="610" y="572" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Remind_di" bpmnElement="Remind"><dc:Bounds x="922" y="567" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="947" y="572" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Chase_di" bpmnElement="Chase"><dc:Bounds x="1655" y="290" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndChased_di" bpmnElement="EndChased"><dc:Bounds x="1834" y="312" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1807" y="354" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Join_di" bpmnElement="Join"><dc:Bounds x="1885" y="125" width="50" height="50" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Notify_di" bpmnElement="Notify"><dc:Bounds x="2072" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="2045" y="174" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_di" bpmnElement="End"><dc:Bounds x="2252" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="2225" y="174" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Cancelled_di" bpmnElement="Cancelled"><dc:Bounds x="437" y="352" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="367" y="380" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Declined_di" bpmnElement="Declined"><dc:Bounds x="777" y="532" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="710" y="560" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Timer_di" bpmnElement="Timer"><dc:Bounds x="852" y="532" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="861" y="560" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Escalated_di" bpmnElement="Escalated"><dc:Bounds x="1567" y="172" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1584" y="200" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="290" y="168" /><di:waypoint x="290" y="330" /><di:waypoint x="395" y="330" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="545" y="330" /><di:waypoint x="625" y="330" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="650" y="355" /><di:waypoint x="650" y="510" /><di:waypoint x="755" y="510" /><bpmndi:BPMNLabel><dc:Bounds x="660" y="365" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="675" y="330" /><di:waypoint x="985" y="330" /><bpmndi:BPMNLabel><dc:Bounds x="685" y="310" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="905" y="510" /><di:waypoint x="1010" y="510" /><di:waypoint x="1010" y="355" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="1035" y="330" /><di:waypoint x="1115" y="330" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="1265" y="330" /><di:waypoint x="1345" y="330" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="1370" y="305" /><di:waypoint x="1370" y="150" /><di:waypoint x="1475" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="1370" y="355" /><di:waypoint x="1370" y="690" /><di:waypoint x="1475" y="690" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_di" bpmnElement="Flow_10"><di:waypoint x="455" y="388" /><di:waypoint x="455" y="405" /><di:waypoint x="514" y="405" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_di" bpmnElement="Flow_11"><di:waypoint x="795" y="568" /><di:waypoint x="795" y="585" /><di:waypoint x="738" y="585" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12_di" bpmnElement="Flow_12"><di:waypoint x="870" y="568" /><di:waypoint x="870" y="585" /><di:waypoint x="922" y="585" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_13_di" bpmnElement="Flow_13"><di:waypoint x="1585" y="208" /><di:waypoint x="1585" y="330" /><di:waypoint x="1655" y="330" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_14_di" bpmnElement="Flow_14"><di:waypoint x="1805" y="330" /><di:waypoint x="1834" y="330" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_15_di" bpmnElement="Flow_15"><di:waypoint x="1625" y="150" /><di:waypoint x="1885" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_16_di" bpmnElement="Flow_16"><di:waypoint x="1625" y="690" /><di:waypoint x="1910" y="690" /><di:waypoint x="1910" y="175" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_17_di" bpmnElement="Flow_17"><di:waypoint x="1935" y="150" /><di:waypoint x="2072" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18_di" bpmnElement="Flow_18"><di:waypoint x="2108" y="150" /><di:waypoint x="2252" y="150" /></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
