<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="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://openrpms.org/bpmn"
             id="administrative-request-routing">

  <collaboration id="Collab_AdminRouting">
    <participant id="Part_Staff" name="Staff Member" processRef="Process_Staff" />
    <participant id="Part_ARMS" name="RPMS / ARMS" processRef="Process_ARMS" />
  </collaboration>

  <process id="Process_Staff" isExecutable="false">
    <startEvent id="Start_EnterRequest" name="Staff enters travel request">
      <outgoing>F1</outgoing>
    </startEvent>
    <task id="Task_EnterTravelInfo" name="Enter training location and travel dates">
      <incoming>F1</incoming>
      <outgoing>F2</outgoing>
    </task>
    <task id="Task_SubmitForApproval" name="Submit — routed electronically for approval">
      <incoming>F2</incoming>
      <outgoing>F3</outgoing>
    </task>
    <endEvent id="End_RequestSubmitted" name="Request approved and filed">
      <incoming>F3</incoming>
    </endEvent>
    <sequenceFlow id="F1" sourceRef="Start_EnterRequest" targetRef="Task_EnterTravelInfo" />
    <sequenceFlow id="F2" sourceRef="Task_EnterTravelInfo" targetRef="Task_SubmitForApproval" />
    <sequenceFlow id="F3" sourceRef="Task_SubmitForApproval" targetRef="End_RequestSubmitted" />
  </process>

  <process id="Process_ARMS" isExecutable="false">
    <startEvent id="Start_ComputeRates" name="Location entered — per diem computation triggered">
      <outgoing>F4</outgoing>
    </startEvent>
    <task id="Task_ComputePerDiem" name="Auto-compute per diem and lodging rates from location">
      <incoming>F4</incoming>
      <outgoing>F5</outgoing>
    </task>
    <endEvent id="End_RatesComputed" name="Rates populated in request form">
      <incoming>F5</incoming>
    </endEvent>
    <sequenceFlow id="F4" sourceRef="Start_ComputeRates" targetRef="Task_ComputePerDiem" />
    <sequenceFlow id="F5" sourceRef="Task_ComputePerDiem" targetRef="End_RatesComputed" />
  </process>

  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collab_AdminRouting">
      <bpmndi:BPMNShape id="S_Staff" bpmnElement="Part_Staff" isHorizontal="true"><dc:Bounds x="160" y="80" width="760" height="160" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_ARMS" bpmnElement="Part_ARMS" isHorizontal="true"><dc:Bounds x="160" y="240" width="760" height="160" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_Start_EnterRequest" bpmnElement="Start_EnterRequest"><dc:Bounds x="212" y="142" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="190" y="185" width="80" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_Task_EnterTravelInfo" bpmnElement="Task_EnterTravelInfo"><dc:Bounds x="300" y="120" width="200" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_Task_SubmitForApproval" bpmnElement="Task_SubmitForApproval"><dc:Bounds x="580" y="120" width="200" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_End_RequestSubmitted" bpmnElement="End_RequestSubmitted"><dc:Bounds x="832" y="142" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="810" y="185" width="80" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_Start_ComputeRates" bpmnElement="Start_ComputeRates"><dc:Bounds x="380" y="302" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="358" y="345" width="80" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_Task_ComputePerDiem" bpmnElement="Task_ComputePerDiem"><dc:Bounds x="460" y="280" width="200" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="S_End_RatesComputed" bpmnElement="End_RatesComputed"><dc:Bounds x="712" y="302" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="690" y="345" width="80" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="E_F1" bpmnElement="F1"><di:waypoint x="248" y="160" /><di:waypoint x="300" y="160" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="E_F2" bpmnElement="F2"><di:waypoint x="500" y="160" /><di:waypoint x="580" y="160" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="E_F3" bpmnElement="F3"><di:waypoint x="780" y="160" /><di:waypoint x="832" y="160" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="E_F4" bpmnElement="F4"><di:waypoint x="416" y="320" /><di:waypoint x="460" y="320" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="E_F5" bpmnElement="F5"><di:waypoint x="660" y="320" /><di:waypoint x="712" y="320" /></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
