<?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" name="Picking up an interlibrary loan" targetNamespace="http://bpmn.io/schema/bpmn" exporter="tok" exporterVersion="1.0">
  <bpmn:error id="Error_Saving_failed" name="Saving failed" />
  <bpmn:collaboration id="collaboration">
    <bpmn:participant id="library" name="University library" processRef="library-process" />
  </bpmn:collaboration>
  <bpmn:process id="library-process" name="Picking up an interlibrary loan" isExecutable="false">
    <bpmn:laneSet id="library-lanes">
      <bpmn:lane id="librarian" name="Interlibrary loan librarian">
        <bpmn:flowNodeRef>arrived</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>register</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>save-failed</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>register-by-hand</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>notify</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>send-back</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>returned</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="reader" name="Reader">
        <bpmn:flowNodeRef>pickup</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>three-days</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>seven-days</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>picked-up</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="system" name="Library system">
        <bpmn:flowNodeRef>remind</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>reminded</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="arrived" name="Book arrived" />
    <bpmn:serviceTask id="register" name="Register the copy" />
    <bpmn:boundaryEvent id="save-failed" name="Saving failed" attachedToRef="register">
      <bpmn:errorEventDefinition id="save-failed-def" errorRef="Error_Saving_failed" />
    </bpmn:boundaryEvent>
    <bpmn:userTask id="register-by-hand" name="Register the copy by hand" />
    <bpmn:userTask id="notify" name="Notify the reader" />
    <bpmn:userTask id="send-back" name="Send the book back" />
    <bpmn:endEvent id="returned" name="Book returned to the lending library" />
    <bpmn:userTask id="pickup" name="Pick up the book" />
    <bpmn:boundaryEvent id="three-days" name="3 days passed" attachedToRef="pickup" cancelActivity="false">
      <bpmn:timerEventDefinition id="three-days-def">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">P3D</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:boundaryEvent>
    <bpmn:boundaryEvent id="seven-days" name="7 days passed" attachedToRef="pickup">
      <bpmn:timerEventDefinition id="seven-days-def">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">P7D</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:boundaryEvent>
    <bpmn:endEvent id="picked-up" name="Book picked up" />
    <bpmn:serviceTask id="remind" name="Send a reminder" />
    <bpmn:endEvent id="reminded" name="Reminder sent" />
    <bpmn:sequenceFlow id="f-arrived-register" sourceRef="arrived" targetRef="register" />
    <bpmn:sequenceFlow id="f-register-notify" sourceRef="register" targetRef="notify" />
    <bpmn:sequenceFlow id="f-notify-pickup" sourceRef="notify" targetRef="pickup" />
    <bpmn:sequenceFlow id="f-pickup-picked-up" sourceRef="pickup" targetRef="picked-up" />
    <bpmn:sequenceFlow id="f-save-failed-register-by-hand" sourceRef="save-failed" targetRef="register-by-hand" />
    <bpmn:sequenceFlow id="f-register-by-hand-notify" sourceRef="register-by-hand" targetRef="notify" />
    <bpmn:sequenceFlow id="f-three-days-remind" sourceRef="three-days" targetRef="remind" />
    <bpmn:sequenceFlow id="f-remind-reminded" sourceRef="remind" targetRef="reminded" />
    <bpmn:sequenceFlow id="f-seven-days-send-back" sourceRef="seven-days" targetRef="send-back" />
    <bpmn:sequenceFlow id="f-send-back-returned" sourceRef="send-back" targetRef="returned" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="collaboration">
      <bpmndi:BPMNShape id="library_di" bpmnElement="library" isHorizontal="true">
        <dc:Bounds x="0" y="0" width="1000" height="550" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="librarian_di" bpmnElement="librarian" isHorizontal="true">
        <dc:Bounds x="30" y="0" width="970" height="270" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reader_di" bpmnElement="reader" isHorizontal="true">
        <dc:Bounds x="30" y="270" width="970" height="140" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="system_di" bpmnElement="system" isHorizontal="true">
        <dc:Bounds x="30" y="410" width="970" height="140" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="arrived_di" bpmnElement="arrived">
        <dc:Bounds x="90" y="52" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="74" y="93" width="68" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="register_di" bpmnElement="register">
        <dc:Bounds x="176" y="30" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="register-by-hand_di" bpmnElement="register-by-hand">
        <dc:Bounds x="326" y="160" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="notify_di" bpmnElement="notify">
        <dc:Bounds x="476" y="30" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="send-back_di" bpmnElement="send-back">
        <dc:Bounds x="776" y="30" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="returned_di" bpmnElement="returned">
        <dc:Bounds x="926" y="52" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="890" y="93" width="108" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="pickup_di" bpmnElement="pickup">
        <dc:Bounds x="626" y="300" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="picked-up_di" bpmnElement="picked-up">
        <dc:Bounds x="808" y="322" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="786" y="363" width="80" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="remind_di" bpmnElement="remind">
        <dc:Bounds x="776" y="440" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reminded_di" bpmnElement="reminded">
        <dc:Bounds x="926" y="462" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="907" y="503" width="74" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="save-failed_di" bpmnElement="save-failed">
        <dc:Bounds x="228" y="92" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="167" y="131" width="74" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="three-days_di" bpmnElement="three-days">
        <dc:Bounds x="678" y="362" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="717" y="400" width="74" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="seven-days_di" bpmnElement="seven-days">
        <dc:Bounds x="634" y="362" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="557" y="400" width="74" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="f-arrived-register_di" bpmnElement="f-arrived-register">
        <di:waypoint x="126" y="70" />
        <di:waypoint x="176" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-register-notify_di" bpmnElement="f-register-notify">
        <di:waypoint x="276" y="62" />
        <di:waypoint x="476" y="62" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-notify-pickup_di" bpmnElement="f-notify-pickup">
        <di:waypoint x="576" y="70" />
        <di:waypoint x="676" y="70" />
        <di:waypoint x="676" y="300" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-pickup-picked-up_di" bpmnElement="f-pickup-picked-up">
        <di:waypoint x="726" y="340" />
        <di:waypoint x="808" y="340" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-save-failed-register-by-hand_di" bpmnElement="f-save-failed-register-by-hand">
        <di:waypoint x="246" y="128" />
        <di:waypoint x="246" y="200" />
        <di:waypoint x="326" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-register-by-hand-notify_di" bpmnElement="f-register-by-hand-notify">
        <di:waypoint x="376" y="160" />
        <di:waypoint x="376" y="78" />
        <di:waypoint x="476" y="78" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-three-days-remind_di" bpmnElement="f-three-days-remind">
        <di:waypoint x="696" y="398" />
        <di:waypoint x="696" y="480" />
        <di:waypoint x="776" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-remind-reminded_di" bpmnElement="f-remind-reminded">
        <di:waypoint x="876" y="480" />
        <di:waypoint x="926" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-seven-days-send-back_di" bpmnElement="f-seven-days-send-back">
        <di:waypoint x="652" y="398" />
        <di:waypoint x="652" y="418" />
        <di:waypoint x="756" y="418" />
        <di:waypoint x="756" y="70" />
        <di:waypoint x="776" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-send-back-returned_di" bpmnElement="f-send-back-returned">
        <di:waypoint x="876" y="70" />
        <di:waypoint x="926" y="70" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
