<?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-happy-path" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:collaboration id="Collaboration_purchase-request-happy-path">
    <bpmn:participant id="Participant_purchase-request-happy-path" name="Purchase Request" processRef="Process_purchase-request-happy-path" />
  </bpmn:collaboration>
  <bpmn:process id="Process_purchase-request-happy-path" name="Purchase Request" isExecutable="true">
    <bpmn:laneSet id="LaneSet_purchase-request-happy-path">
      <bpmn:lane id="Lane_1" name="Requester"><bpmn:flowNodeRef>Start</bpmn:flowNodeRef><bpmn:flowNodeRef>Receive</bpmn:flowNodeRef><bpmn:flowNodeRef>Join</bpmn:flowNodeRef><bpmn:flowNodeRef>End</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:lane>
      <bpmn:lane id="Lane_3" name="Budget Owner"><bpmn:flowNodeRef>Approve</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_10</bpmn:outgoing></bpmn:userTask>
    <bpmn:callActivity id="Invoice" name="Process the invoice"><bpmn:incoming>Flow_9</bpmn:incoming><bpmn:outgoing>Flow_11</bpmn:outgoing></bpmn:callActivity>
    <bpmn:parallelGateway id="Join"><bpmn:incoming>Flow_10</bpmn:incoming><bpmn:incoming>Flow_11</bpmn:incoming><bpmn:outgoing>Flow_12</bpmn:outgoing></bpmn:parallelGateway>
    <bpmn:endEvent id="End" name="Purchase completed"><bpmn:incoming>Flow_12</bpmn:incoming></bpmn:endEvent>
    <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="Receive" targetRef="Join" />
    <bpmn:sequenceFlow id="Flow_11" sourceRef="Invoice" targetRef="Join" />
    <bpmn:sequenceFlow id="Flow_12" sourceRef="Join" targetRef="End" />
  </bpmn:process>

  <bpmndi:BPMNDiagram id="Diagram_purchase-request-happy-path">
    <bpmndi:BPMNPlane id="Plane_purchase-request-happy-path" bpmnElement="Collaboration_purchase-request-happy-path">
      <bpmndi:BPMNShape id="Participant_purchase-request-happy-path_di" bpmnElement="Participant_purchase-request-happy-path" isHorizontal="true"><dc:Bounds x="160" y="80" width="1900" height="560" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1_di" bpmnElement="Lane_1" isHorizontal="true"><dc:Bounds x="190" y="80" width="1870" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_2_di" bpmnElement="Lane_2" isHorizontal="true"><dc:Bounds x="190" y="220" width="1870" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_3_di" bpmnElement="Lane_3" isHorizontal="true"><dc:Bounds x="190" y="360" width="1870" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_4_di" bpmnElement="Lane_4" isHorizontal="true"><dc:Bounds x="190" y="500" width="1870" height="140" /></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="250" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Amount_di" bpmnElement="Amount" isMarkerVisible="true"><dc:Bounds x="625" y="265" width="50" height="50" /><bpmndi:BPMNLabel><dc:Bounds x="605" y="233" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Approve_di" bpmnElement="Approve"><dc:Bounds x="755" y="390" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Merge_di" bpmnElement="Merge" isMarkerVisible="true"><dc:Bounds x="985" y="265" width="50" height="50" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Order_di" bpmnElement="Order"><dc:Bounds x="1115" y="250" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Split_di" bpmnElement="Split"><dc:Bounds x="1345" y="265" 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="530" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Join_di" bpmnElement="Join"><dc:Bounds x="1705" y="125" width="50" height="50" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_di" bpmnElement="End"><dc:Bounds x="1892" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1865" y="174" 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="290" /><di:waypoint x="395" y="290" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="545" y="290" /><di:waypoint x="625" y="290" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="650" y="315" /><di:waypoint x="650" y="430" /><di:waypoint x="755" y="430" /><bpmndi:BPMNLabel><dc:Bounds x="660" y="325" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="675" y="290" /><di:waypoint x="985" y="290" /><bpmndi:BPMNLabel><dc:Bounds x="685" y="270" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="905" y="430" /><di:waypoint x="1010" y="430" /><di:waypoint x="1010" y="315" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="1035" y="290" /><di:waypoint x="1115" y="290" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="1265" y="290" /><di:waypoint x="1345" y="290" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="1370" y="265" /><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="315" /><di:waypoint x="1370" y="570" /><di:waypoint x="1475" y="570" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_di" bpmnElement="Flow_10"><di:waypoint x="1625" y="150" /><di:waypoint x="1705" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_di" bpmnElement="Flow_11"><di:waypoint x="1625" y="570" /><di:waypoint x="1730" y="570" /><di:waypoint x="1730" y="175" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12_di" bpmnElement="Flow_12"><di:waypoint x="1755" y="150" /><di:waypoint x="1892" y="150" /></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
