<?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_1" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:collaboration id="Collaboration_1">
    <bpmn:participant id="Participant_1" name="Leave Request Approval" processRef="Process_1" />
  </bpmn:collaboration>
  <bpmn:process id="Process_1" name="Leave Request Approval" isExecutable="false">
    <bpmn:laneSet id="LaneSet_1">
      <bpmn:lane id="Lane_Employee" name="Employee">
        <bpmn:flowNodeRef>StartEvent_LeaveRequested</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_HRSystem" name="HR system">
        <bpmn:flowNodeRef>Task_CheckLeaveBalance</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_EnoughBalance</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_NotifyLowBalance</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_RequestDeclined</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_RemindManager</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_ReminderSent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_RecordLeaveCalendar</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_SendConfirmation</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_LeaveApproved</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_SendRejection</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_LeaveRejected</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_Manager" name="Manager">
        <bpmn:flowNodeRef>Task_ReviewLeaveRequest</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>BoundaryEvent_3dNoAnswer</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_Approved</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="StartEvent_LeaveRequested" name="Leave requested">
      <bpmn:outgoing>Flow_StartToCheckBalance</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:businessRuleTask id="Task_CheckLeaveBalance" name="Check leave balance">
      <bpmn:incoming>Flow_StartToCheckBalance</bpmn:incoming>
      <bpmn:outgoing>Flow_CheckToGateway</bpmn:outgoing>
    </bpmn:businessRuleTask>
    <bpmn:exclusiveGateway id="Gateway_EnoughBalance" name="Enough balance?" gatewayDirection="Diverging" default="Flow_GatewayNo_ToNotify">
      <bpmn:incoming>Flow_CheckToGateway</bpmn:incoming>
      <bpmn:outgoing>Flow_GatewayNo_ToNotify</bpmn:outgoing>
      <bpmn:outgoing>Flow_GatewayYes_ToReview</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sendTask id="Task_NotifyLowBalance" name="Notify employee of low balance">
      <bpmn:incoming>Flow_GatewayNo_ToNotify</bpmn:incoming>
      <bpmn:outgoing>Flow_NotifyToDeclined</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:endEvent id="EndEvent_RequestDeclined" name="Request declined">
      <bpmn:incoming>Flow_NotifyToDeclined</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:userTask id="Task_ReviewLeaveRequest" name="Review leave request">
      <bpmn:incoming>Flow_GatewayYes_ToReview</bpmn:incoming>
      <bpmn:outgoing>Flow_ReviewToGatewayApproved</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:boundaryEvent id="BoundaryEvent_3dNoAnswer" name="3 days without an answer" attachedToRef="Task_ReviewLeaveRequest" cancelActivity="false">
      <bpmn:outgoing>Flow_BoundaryEventToRemind</bpmn:outgoing>
      <bpmn:timerEventDefinition id="EventDef_1" />
    </bpmn:boundaryEvent>
    <bpmn:sendTask id="Task_RemindManager" name="Remind manager">
      <bpmn:incoming>Flow_BoundaryEventToRemind</bpmn:incoming>
      <bpmn:outgoing>Flow_RemindToEndReminder</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:endEvent id="EndEvent_ReminderSent" name="Reminder sent">
      <bpmn:incoming>Flow_RemindToEndReminder</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:exclusiveGateway id="Gateway_Approved" name="Approved?" gatewayDirection="Diverging" default="Flow_ApprovedNo_ToSendRejection">
      <bpmn:incoming>Flow_ReviewToGatewayApproved</bpmn:incoming>
      <bpmn:outgoing>Flow_ApprovedYes_ToRecordLeave</bpmn:outgoing>
      <bpmn:outgoing>Flow_ApprovedNo_ToSendRejection</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="Task_RecordLeaveCalendar" name="Record leave in calendar">
      <bpmn:incoming>Flow_ApprovedYes_ToRecordLeave</bpmn:incoming>
      <bpmn:outgoing>Flow_RecordLeaveToSendConfirmation</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sendTask id="Task_SendConfirmation" name="Send confirmation">
      <bpmn:incoming>Flow_RecordLeaveToSendConfirmation</bpmn:incoming>
      <bpmn:outgoing>Flow_ConfirmationToApprovedEnd</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:endEvent id="EndEvent_LeaveApproved" name="Leave approved">
      <bpmn:incoming>Flow_ConfirmationToApprovedEnd</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sendTask id="Task_SendRejection" name="Send rejection with reason">
      <bpmn:incoming>Flow_ApprovedNo_ToSendRejection</bpmn:incoming>
      <bpmn:outgoing>Flow_SendRejectionToEndRejected</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:endEvent id="EndEvent_LeaveRejected" name="Leave rejected">
      <bpmn:incoming>Flow_SendRejectionToEndRejected</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_StartToCheckBalance" sourceRef="StartEvent_LeaveRequested" targetRef="Task_CheckLeaveBalance" />
    <bpmn:sequenceFlow id="Flow_CheckToGateway" sourceRef="Task_CheckLeaveBalance" targetRef="Gateway_EnoughBalance" />
    <bpmn:sequenceFlow id="Flow_GatewayNo_ToNotify" name="No" sourceRef="Gateway_EnoughBalance" targetRef="Task_NotifyLowBalance" />
    <bpmn:sequenceFlow id="Flow_NotifyToDeclined" sourceRef="Task_NotifyLowBalance" targetRef="EndEvent_RequestDeclined" />
    <bpmn:sequenceFlow id="Flow_GatewayYes_ToReview" name="Yes" sourceRef="Gateway_EnoughBalance" targetRef="Task_ReviewLeaveRequest" />
    <bpmn:sequenceFlow id="Flow_ReviewToGatewayApproved" sourceRef="Task_ReviewLeaveRequest" targetRef="Gateway_Approved" />
    <bpmn:sequenceFlow id="Flow_BoundaryEventToRemind" sourceRef="BoundaryEvent_3dNoAnswer" targetRef="Task_RemindManager" />
    <bpmn:sequenceFlow id="Flow_RemindToEndReminder" sourceRef="Task_RemindManager" targetRef="EndEvent_ReminderSent" />
    <bpmn:sequenceFlow id="Flow_ApprovedYes_ToRecordLeave" name="Yes" sourceRef="Gateway_Approved" targetRef="Task_RecordLeaveCalendar" />
    <bpmn:sequenceFlow id="Flow_RecordLeaveToSendConfirmation" sourceRef="Task_RecordLeaveCalendar" targetRef="Task_SendConfirmation" />
    <bpmn:sequenceFlow id="Flow_ConfirmationToApprovedEnd" sourceRef="Task_SendConfirmation" targetRef="EndEvent_LeaveApproved" />
    <bpmn:sequenceFlow id="Flow_ApprovedNo_ToSendRejection" name="No" sourceRef="Gateway_Approved" targetRef="Task_SendRejection" />
    <bpmn:sequenceFlow id="Flow_SendRejectionToEndRejected" sourceRef="Task_SendRejection" targetRef="EndEvent_LeaveRejected" />
  </bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
  <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1">
    <bpmndi:BPMNShape id="BPMNShape_Participant_1" bpmnElement="Participant_1" isHorizontal="true">
      <dc:Bounds x="0" y="0" width="1708" height="820"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Lane_Employee" bpmnElement="Lane_Employee" isHorizontal="true">
      <dc:Bounds x="30" y="0" width="1678" height="200"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Lane_HRSystem" bpmnElement="Lane_HRSystem" isHorizontal="true">
      <dc:Bounds x="30" y="200" width="1678" height="420"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Lane_Manager" bpmnElement="Lane_Manager" isHorizontal="true">
      <dc:Bounds x="30" y="620" width="1678" height="200"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_StartEvent_LeaveRequested" bpmnElement="StartEvent_LeaveRequested">
      <dc:Bounds x="192" y="82" width="36" height="36"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="166" y="63" width="88" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_CheckLeaveBalance" bpmnElement="Task_CheckLeaveBalance">
      <dc:Bounds x="360" y="370" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Gateway_EnoughBalance" bpmnElement="Gateway_EnoughBalance">
      <dc:Bounds x="585" y="385" width="50" height="50"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="565" y="366" width="90" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_NotifyLowBalance" bpmnElement="Task_NotifyLowBalance">
      <dc:Bounds x="760" y="370" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_RequestDeclined" bpmnElement="EndEvent_RequestDeclined">
      <dc:Bounds x="992" y="522" width="36" height="36"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="965" y="503" width="90" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_ReviewLeaveRequest" bpmnElement="Task_ReviewLeaveRequest">
      <dc:Bounds x="760" y="680" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_BoundaryEvent_3dNoAnswer" bpmnElement="BoundaryEvent_3dNoAnswer">
      <dc:Bounds x="818" y="742" width="36" height="36"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="732" y="776" width="90" height="28"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_RemindManager" bpmnElement="Task_RemindManager">
      <dc:Bounds x="960" y="370" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_ReminderSent" bpmnElement="EndEvent_ReminderSent">
      <dc:Bounds x="1192" y="262" width="36" height="36"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="1171" y="303" width="78" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Gateway_Approved" bpmnElement="Gateway_Approved">
      <dc:Bounds x="985" y="695" width="50" height="50"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="980" y="750" width="59" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_RecordLeaveCalendar" bpmnElement="Task_RecordLeaveCalendar">
      <dc:Bounds x="1160" y="370" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_SendConfirmation" bpmnElement="Task_SendConfirmation">
      <dc:Bounds x="1360" y="370" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_LeaveApproved" bpmnElement="EndEvent_LeaveApproved">
      <dc:Bounds x="1592" y="392" width="36" height="36"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="1568" y="433" width="85" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_Task_SendRejection" bpmnElement="Task_SendRejection">
      <dc:Bounds x="1160" y="500" width="100" height="80"/>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNShape id="BPMNShape_EndEvent_LeaveRejected" bpmnElement="EndEvent_LeaveRejected">
      <dc:Bounds x="1392" y="522" width="36" height="36"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="1371" y="563" width="78" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNShape>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_StartToCheckBalance" bpmnElement="Flow_StartToCheckBalance">
      <di:waypoint x="210" y="118"/>
      <di:waypoint x="210" y="410"/>
      <di:waypoint x="360" y="410"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_CheckToGateway" bpmnElement="Flow_CheckToGateway">
      <di:waypoint x="460" y="410"/>
      <di:waypoint x="585" y="410"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_GatewayNo_ToNotify" bpmnElement="Flow_GatewayNo_ToNotify">
      <di:waypoint x="635" y="410"/>
      <di:waypoint x="760" y="410"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="639" y="394" width="20" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_NotifyToDeclined" bpmnElement="Flow_NotifyToDeclined">
      <di:waypoint x="810" y="450"/>
      <di:waypoint x="810" y="540"/>
      <di:waypoint x="992" y="540"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_GatewayYes_ToReview" bpmnElement="Flow_GatewayYes_ToReview">
      <di:waypoint x="610" y="435"/>
      <di:waypoint x="610" y="720"/>
      <di:waypoint x="760" y="720"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="615" y="439" width="25" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_ReviewToGatewayApproved" bpmnElement="Flow_ReviewToGatewayApproved">
      <di:waypoint x="860" y="720"/>
      <di:waypoint x="985" y="720"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_BoundaryEventToRemind" bpmnElement="Flow_BoundaryEventToRemind">
      <di:waypoint x="836" y="778"/>
      <di:waypoint x="836" y="796"/>
      <di:waypoint x="872" y="796"/>
      <di:waypoint x="872" y="410"/>
      <di:waypoint x="960" y="410"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_RemindToEndReminder" bpmnElement="Flow_RemindToEndReminder">
      <di:waypoint x="1060" y="410"/>
      <di:waypoint x="1142" y="410"/>
      <di:waypoint x="1142" y="280"/>
      <di:waypoint x="1192" y="280"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_ApprovedYes_ToRecordLeave" bpmnElement="Flow_ApprovedYes_ToRecordLeave">
      <di:waypoint x="1010" y="695"/>
      <di:waypoint x="1010" y="576"/>
      <di:waypoint x="1126" y="576"/>
      <di:waypoint x="1126" y="468"/>
      <di:waypoint x="1210" y="468"/>
      <di:waypoint x="1210" y="450"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="1015" y="677" width="25" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_RecordLeaveToSendConfirmation" bpmnElement="Flow_RecordLeaveToSendConfirmation">
      <di:waypoint x="1260" y="410"/>
      <di:waypoint x="1360" y="410"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_ConfirmationToApprovedEnd" bpmnElement="Flow_ConfirmationToApprovedEnd">
      <di:waypoint x="1460" y="410"/>
      <di:waypoint x="1592" y="410"/>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_ApprovedNo_ToSendRejection" bpmnElement="Flow_ApprovedNo_ToSendRejection">
      <di:waypoint x="1035" y="720"/>
      <di:waypoint x="1142" y="720"/>
      <di:waypoint x="1142" y="540"/>
      <di:waypoint x="1160" y="540"/>
      <bpmndi:BPMNLabel>
        <dc:Bounds x="1039" y="704" width="20" height="14"/>
      </bpmndi:BPMNLabel>
    </bpmndi:BPMNEdge>
    <bpmndi:BPMNEdge id="BPMNEdge_Flow_SendRejectionToEndRejected" bpmnElement="Flow_SendRejectionToEndRejected">
      <di:waypoint x="1260" y="540"/>
      <di:waypoint x="1392" y="540"/>
    </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>