<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  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"
  targetNamespace="http://bpmn.io/schema/bpmn"
  id="Definitions_QuotApproval">

  <bpmn:process id="Process_QuotApproval" isExecutable="false" name="Quotation Approval">

    <bpmn:startEvent id="SE_Start" name="Quotation&#10;Created">
      <bpmn:outgoing>SF_1</bpmn:outgoing>
    </bpmn:startEvent>

    <bpmn:userTask id="T_Salesman" name="Salesman&#10;Prepares Quotation">
      <bpmn:incoming>SF_1</bpmn:incoming>
      <bpmn:outgoing>SF_2</bpmn:outgoing>
    </bpmn:userTask>

    <bpmn:userTask id="T_Finance" name="Financial Director&#10;1st Approval">
      <bpmn:incoming>SF_2</bpmn:incoming>
      <bpmn:outgoing>SF_3</bpmn:outgoing>
    </bpmn:userTask>

    <bpmn:exclusiveGateway id="GW_Finance" name="Financially&#10;Approved?">
      <bpmn:incoming>SF_3</bpmn:incoming>
      <bpmn:outgoing>SF_Yes1</bpmn:outgoing>
      <bpmn:outgoing>SF_No1</bpmn:outgoing>
    </bpmn:exclusiveGateway>

    <bpmn:userTask id="T_Sales" name="Sales Director&#10;2nd Approval">
      <bpmn:incoming>SF_Yes1</bpmn:incoming>
      <bpmn:outgoing>SF_4</bpmn:outgoing>
    </bpmn:userTask>

    <bpmn:exclusiveGateway id="GW_Sales" name="Commercially&#10;Approved?">
      <bpmn:incoming>SF_4</bpmn:incoming>
      <bpmn:outgoing>SF_Yes2</bpmn:outgoing>
      <bpmn:outgoing>SF_No2</bpmn:outgoing>
    </bpmn:exclusiveGateway>

    <bpmn:endEvent id="SE_Approved" name="Quotation&#10;Fully Approved">
      <bpmn:incoming>SF_Yes2</bpmn:incoming>
    </bpmn:endEvent>

    <bpmn:endEvent id="SE_RejFin" name="Returned to&#10;Salesman">
      <bpmn:incoming>SF_No1</bpmn:incoming>
    </bpmn:endEvent>

    <bpmn:endEvent id="SE_RejSales" name="Returned to&#10;Salesman">
      <bpmn:incoming>SF_No2</bpmn:incoming>
    </bpmn:endEvent>

    <bpmn:sequenceFlow id="SF_1" sourceRef="SE_Start" targetRef="T_Salesman"/>
    <bpmn:sequenceFlow id="SF_2" sourceRef="T_Salesman" targetRef="T_Finance"/>
    <bpmn:sequenceFlow id="SF_3" sourceRef="T_Finance" targetRef="GW_Finance"/>
    <bpmn:sequenceFlow id="SF_Yes1" name="Yes" sourceRef="GW_Finance" targetRef="T_Sales"/>
    <bpmn:sequenceFlow id="SF_No1"  name="No"  sourceRef="GW_Finance" targetRef="SE_RejFin"/>
    <bpmn:sequenceFlow id="SF_4"    sourceRef="T_Sales" targetRef="GW_Sales"/>
    <bpmn:sequenceFlow id="SF_Yes2" name="Yes" sourceRef="GW_Sales" targetRef="SE_Approved"/>
    <bpmn:sequenceFlow id="SF_No2"  name="No"  sourceRef="GW_Sales" targetRef="SE_RejSales"/>
  </bpmn:process>

  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_QuotApproval">

      <bpmndi:BPMNShape id="Sh_SE_Start" bpmnElement="SE_Start">
        <dc:Bounds x="62" y="192" width="36" height="36"/>
        <bpmndi:BPMNLabel><dc:Bounds x="45" y="235" width="71" height="27"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_T_Salesman" bpmnElement="T_Salesman">
        <dc:Bounds x="160" y="170" width="120" height="80"/>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_T_Finance" bpmnElement="T_Finance">
        <dc:Bounds x="350" y="170" width="120" height="80"/>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_GW_Finance" bpmnElement="GW_Finance" isMarkerVisible="true">
        <dc:Bounds x="545" y="185" width="50" height="50"/>
        <bpmndi:BPMNLabel><dc:Bounds x="530" y="242" width="80" height="27"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_T_Sales" bpmnElement="T_Sales">
        <dc:Bounds x="660" y="170" width="120" height="80"/>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_GW_Sales" bpmnElement="GW_Sales" isMarkerVisible="true">
        <dc:Bounds x="855" y="185" width="50" height="50"/>
        <bpmndi:BPMNLabel><dc:Bounds x="838" y="242" width="85" height="27"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_SE_Approved" bpmnElement="SE_Approved">
        <dc:Bounds x="972" y="192" width="36" height="36"/>
        <bpmndi:BPMNLabel><dc:Bounds x="950" y="235" width="80" height="27"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_SE_RejFin" bpmnElement="SE_RejFin">
        <dc:Bounds x="545" y="330" width="36" height="36"/>
        <bpmndi:BPMNLabel><dc:Bounds x="523" y="373" width="80" height="27"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape id="Sh_SE_RejSales" bpmnElement="SE_RejSales">
        <dc:Bounds x="855" y="330" width="36" height="36"/>
        <bpmndi:BPMNLabel><dc:Bounds x="833" y="373" width="80" height="27"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>

      <!-- Edges -->
      <bpmndi:BPMNEdge id="Ed_SF_1" bpmnElement="SF_1">
        <di:waypoint x="98"  y="210"/><di:waypoint x="160" y="210"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_2" bpmnElement="SF_2">
        <di:waypoint x="280" y="210"/><di:waypoint x="350" y="210"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_3" bpmnElement="SF_3">
        <di:waypoint x="470" y="210"/><di:waypoint x="545" y="210"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_Yes1" bpmnElement="SF_Yes1">
        <di:waypoint x="595" y="210"/><di:waypoint x="660" y="210"/>
        <bpmndi:BPMNLabel><dc:Bounds x="611" y="192" width="18" height="14"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_No1" bpmnElement="SF_No1">
        <di:waypoint x="570" y="235"/><di:waypoint x="570" y="330"/>
        <bpmndi:BPMNLabel><dc:Bounds x="576" y="278" width="17" height="14"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_4" bpmnElement="SF_4">
        <di:waypoint x="780" y="210"/><di:waypoint x="855" y="210"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_Yes2" bpmnElement="SF_Yes2">
        <di:waypoint x="905" y="210"/><di:waypoint x="972" y="210"/>
        <bpmndi:BPMNLabel><dc:Bounds x="923" y="192" width="18" height="14"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Ed_SF_No2" bpmnElement="SF_No2">
        <di:waypoint x="880" y="235"/><di:waypoint x="880" y="330"/>
        <bpmndi:BPMNLabel><dc:Bounds x="886" y="278" width="17" height="14"/></bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>

    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
