<?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" name="Interlibrary loan" targetNamespace="http://bpmn.io/schema/bpmn" exporter="tok" exporterVersion="1.0">
  <bpmn:collaboration id="collaboration">
    <bpmn:participant id="library" name="University library" processRef="library-process" />
  </bpmn:collaboration>
  <bpmn:process id="library-process" name="Interlibrary loan" isExecutable="false">
    <bpmn:laneSet id="library-lanes">
      <bpmn:lane id="reader" name="Reader">
        <bpmn:flowNodeRef>need</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>request</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="librarian" name="Librarian">
        <bpmn:flowNodeRef>catalogues</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>available</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>locate</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>order</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>located</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ordered</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="need" name="Book needed" />
    <bpmn:userTask id="request" name="Submit a loan request" />
    <bpmn:userTask id="catalogues" name="Search the catalogues" />
    <bpmn:exclusiveGateway id="available" name="Is the book held locally?" />
    <bpmn:userTask id="locate" name="Point to the local copy" />
    <bpmn:userTask id="order" name="Order from another library" />
    <bpmn:endEvent id="located" name="Local copy located" />
    <bpmn:endEvent id="ordered" name="Order placed" />
    <bpmn:sequenceFlow id="f-need-request" sourceRef="need" targetRef="request" />
    <bpmn:sequenceFlow id="f-request-catalogues" sourceRef="request" targetRef="catalogues" />
    <bpmn:sequenceFlow id="f-catalogues-available" sourceRef="catalogues" targetRef="available" />
    <bpmn:sequenceFlow id="f-available-locate" name="yes" sourceRef="available" targetRef="locate" />
    <bpmn:sequenceFlow id="f-available-order" name="no" sourceRef="available" targetRef="order" />
    <bpmn:sequenceFlow id="f-locate-located" sourceRef="locate" targetRef="located" />
    <bpmn:sequenceFlow id="f-order-ordered" sourceRef="order" targetRef="ordered" />
  </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="800" height="410" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="reader_di" bpmnElement="reader" isHorizontal="true">
        <dc:Bounds x="30" y="0" width="770" height="140" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="librarian_di" bpmnElement="librarian" isHorizontal="true">
        <dc:Bounds x="30" y="140" width="770" height="270" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="need_di" bpmnElement="need">
        <dc:Bounds x="90" y="52" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="77" y="93" width="62" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="request_di" bpmnElement="request">
        <dc:Bounds x="176" y="30" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="catalogues_di" bpmnElement="catalogues">
        <dc:Bounds x="326" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="available_di" bpmnElement="available" isMarkerVisible="true">
        <dc:Bounds x="476" y="185" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="506" y="238" width="62" height="35" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="locate_di" bpmnElement="locate">
        <dc:Bounds x="576" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="order_di" bpmnElement="order">
        <dc:Bounds x="576" y="300" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="located_di" bpmnElement="located">
        <dc:Bounds x="726" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="693" y="233" width="102" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ordered_di" bpmnElement="ordered">
        <dc:Bounds x="726" y="322" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="710" y="363" width="68" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="f-need-request_di" bpmnElement="f-need-request">
        <di:waypoint x="126" y="70" />
        <di:waypoint x="176" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-request-catalogues_di" bpmnElement="f-request-catalogues">
        <di:waypoint x="276" y="70" />
        <di:waypoint x="376" y="70" />
        <di:waypoint x="376" y="170" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-catalogues-available_di" bpmnElement="f-catalogues-available">
        <di:waypoint x="426" y="210" />
        <di:waypoint x="476" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-available-locate_di" bpmnElement="f-available-locate">
        <di:waypoint x="526" y="210" />
        <di:waypoint x="576" y="210" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="533" y="195" width="18" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-available-order_di" bpmnElement="f-available-order">
        <di:waypoint x="501" y="235" />
        <di:waypoint x="501" y="340" />
        <di:waypoint x="576" y="340" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="509" y="325" width="12" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-locate-located_di" bpmnElement="f-locate-located">
        <di:waypoint x="676" y="210" />
        <di:waypoint x="726" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="f-order-ordered_di" bpmnElement="f-order-ordered">
        <di:waypoint x="676" y="340" />
        <di:waypoint x="726" y="340" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
