<?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="Definitions_invoice-approval" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:collaboration id="Collaboration_invoice-approval">
    <bpmn:participant id="Participant_invoice-approval" name="Invoice Approval" processRef="Process_invoice-approval" />
  </bpmn:collaboration>
  <bpmn:process id="Process_invoice-approval" name="Invoice Approval" isExecutable="true">
    <bpmn:laneSet id="LaneSet_invoice-approval">
      <bpmn:lane id="Lane_1" name="Accounts Payable"><bpmn:flowNodeRef>Start</bpmn:flowNodeRef><bpmn:flowNodeRef>Check</bpmn:flowNodeRef><bpmn:flowNodeRef>Amount</bpmn:flowNodeRef><bpmn:flowNodeRef>Pay</bpmn:flowNodeRef><bpmn:flowNodeRef>Reconcile</bpmn:flowNodeRef><bpmn:flowNodeRef>End</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_2" name="Budget Owner"><bpmn:flowNodeRef>Approve</bpmn:flowNodeRef><bpmn:flowNodeRef>Approved</bpmn:flowNodeRef><bpmn:flowNodeRef>Clarify</bpmn:flowNodeRef><bpmn:flowNodeRef>EndRejected</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_3" name="CFO"><bpmn:flowNodeRef>ApproveCfo</bpmn:flowNodeRef></bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="Start" name="Invoice received"><bpmn:outgoing>Flow_1</bpmn:outgoing></bpmn:startEvent>
    <bpmn:userTask id="Check" name="Check invoice against the order"><bpmn:incoming>Flow_1</bpmn:incoming><bpmn:outgoing>Flow_2</bpmn:outgoing></bpmn:userTask>
    <bpmn:exclusiveGateway id="Amount" name="Amount above the limit?"><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 invoice"><bpmn:incoming>Flow_3</bpmn:incoming><bpmn:outgoing>Flow_5</bpmn:outgoing></bpmn:userTask>
    <bpmn:userTask id="ApproveCfo" name="Approve the invoice"><bpmn:incoming>Flow_4</bpmn:incoming><bpmn:outgoing>Flow_6</bpmn:outgoing></bpmn:userTask>
    <bpmn:exclusiveGateway id="Approved" name="Approved?"><bpmn:incoming>Flow_5</bpmn:incoming><bpmn:incoming>Flow_6</bpmn:incoming><bpmn:outgoing>Flow_7</bpmn:outgoing><bpmn:outgoing>Flow_8</bpmn:outgoing></bpmn:exclusiveGateway>
    <bpmn:userTask id="Pay" name="Pay the invoice"><bpmn:incoming>Flow_7</bpmn:incoming><bpmn:outgoing>Flow_9</bpmn:outgoing></bpmn:userTask>
    <bpmn:userTask id="Reconcile" name="Reconcile the payment"><bpmn:incoming>Flow_9</bpmn:incoming><bpmn:outgoing>Flow_10</bpmn:outgoing></bpmn:userTask>
    <bpmn:endEvent id="End" name="Invoice paid"><bpmn:incoming>Flow_10</bpmn:incoming></bpmn:endEvent>
    <bpmn:userTask id="Clarify" name="Reject and state the reason"><bpmn:incoming>Flow_8</bpmn:incoming><bpmn:outgoing>Flow_11</bpmn:outgoing></bpmn:userTask>
    <bpmn:endEvent id="EndRejected" name="Invoice rejected"><bpmn:incoming>Flow_11</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="No" sourceRef="Amount" targetRef="Approve" />
    <bpmn:sequenceFlow id="Flow_4" name="Yes" sourceRef="Amount" targetRef="ApproveCfo" />
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Approve" targetRef="Approved" />
    <bpmn:sequenceFlow id="Flow_6" sourceRef="ApproveCfo" targetRef="Approved" />
    <bpmn:sequenceFlow id="Flow_7" name="Yes" sourceRef="Approved" targetRef="Pay" />
    <bpmn:sequenceFlow id="Flow_8" name="No" sourceRef="Approved" targetRef="Clarify" />
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Pay" targetRef="Reconcile" />
    <bpmn:sequenceFlow id="Flow_10" sourceRef="Reconcile" targetRef="End" />
    <bpmn:sequenceFlow id="Flow_11" sourceRef="Clarify" targetRef="EndRejected" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="Diagram_invoice-approval">
    <bpmndi:BPMNPlane id="Plane_invoice-approval" bpmnElement="Collaboration_invoice-approval">
      <bpmndi:BPMNShape id="Participant_invoice-approval_di" bpmnElement="Participant_invoice-approval" isHorizontal="true"><dc:Bounds x="160" y="80" width="1740" height="420" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1_di" bpmnElement="Lane_1" isHorizontal="true"><dc:Bounds x="190" y="80" width="1710" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_2_di" bpmnElement="Lane_2" isHorizontal="true"><dc:Bounds x="190" y="220" width="1710" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_3_di" bpmnElement="Lane_3" isHorizontal="true"><dc:Bounds x="190" y="360" width="1710" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Start_di" bpmnElement="Start"><dc:Bounds x="282" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="255" y="174" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Check_di" bpmnElement="Check"><dc:Bounds x="425" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Amount_di" bpmnElement="Amount" isMarkerVisible="true"><dc:Bounds x="675" y="125" width="50" height="50" /><bpmndi:BPMNLabel><dc:Bounds x="655" y="91" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Approve_di" bpmnElement="Approve"><dc:Bounds x="825" y="250" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ApproveCfo_di" bpmnElement="ApproveCfo"><dc:Bounds x="825" y="390" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Approved_di" bpmnElement="Approved" isMarkerVisible="true"><dc:Bounds x="1075" y="265" width="50" height="50" /><bpmndi:BPMNLabel><dc:Bounds x="1055" y="231" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Pay_di" bpmnElement="Pay"><dc:Bounds x="1225" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Reconcile_di" bpmnElement="Reconcile"><dc:Bounds x="1425" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_di" bpmnElement="End"><dc:Bounds x="1682" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1655" y="174" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Clarify_di" bpmnElement="Clarify"><dc:Bounds x="1225" y="250" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndRejected_di" bpmnElement="EndRejected"><dc:Bounds x="1482" y="272" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1455" y="314" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="318" y="150" /><di:waypoint x="425" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="575" y="150" /><di:waypoint x="675" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="700" y="175" /><di:waypoint x="700" y="290" /><di:waypoint x="825" y="290" /><bpmndi:BPMNLabel><dc:Bounds x="712" y="270" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="700" y="175" /><di:waypoint x="700" y="430" /><di:waypoint x="825" y="430" /><bpmndi:BPMNLabel><dc:Bounds x="712" y="410" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="975" y="290" /><di:waypoint x="1075" y="290" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="975" y="430" /><di:waypoint x="1100" y="430" /><di:waypoint x="1100" y="315" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="1100" y="265" /><di:waypoint x="1100" y="150" /><di:waypoint x="1225" y="150" /><bpmndi:BPMNLabel><dc:Bounds x="1112" y="130" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="1125" y="290" /><di:waypoint x="1225" y="290" /><bpmndi:BPMNLabel><dc:Bounds x="1133" y="270" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="1375" y="150" /><di:waypoint x="1425" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_di" bpmnElement="Flow_10"><di:waypoint x="1575" y="150" /><di:waypoint x="1682" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_di" bpmnElement="Flow_11"><di:waypoint x="1375" y="290" /><di:waypoint x="1482" y="290" /></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
