<?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_Oczekiwanie" targetNamespace="https://codeberg.org/MarekDeja/ipm/diagramy/05">
  <bpmn:message id="Msg_Zamowienie" name="Zamówienie" />
  <bpmn:message id="Msg_Ponaglenie" name="Ponaglenie" />
  <bpmn:message id="Msg_Przesylka" name="Przesyłka z egzemplarzem" />
  <bpmn:message id="Msg_Odmowa" name="Odmowa" />
  <bpmn:collaboration id="Collaboration_Oczekiwanie">
    <bpmn:participant id="Participant_Biblioteka" name="Biblioteka uczelniana" processRef="Process_Oczekiwanie" />
    <bpmn:participant id="Participant_Udostepniajaca" name="Biblioteka udostępniająca" />
    <bpmn:messageFlow id="MF_Zamowienie" name="Zamówienie" sourceRef="Task_Wyslanie" targetRef="Participant_Udostepniajaca" messageRef="Msg_Zamowienie" />
    <bpmn:messageFlow id="MF_Ponaglenie" name="Ponaglenie" sourceRef="Task_Ponaglenie" targetRef="Participant_Udostepniajaca" messageRef="Msg_Ponaglenie" />
    <bpmn:messageFlow id="MF_Przesylka" name="Przesyłka" sourceRef="Participant_Udostepniajaca" targetRef="Catch_Egzemplarz" messageRef="Msg_Przesylka" />
    <bpmn:messageFlow id="MF_Odmowa" name="Odmowa" sourceRef="Participant_Udostepniajaca" targetRef="Catch_Odmowa" messageRef="Msg_Odmowa" />
  </bpmn:collaboration>
  <bpmn:process id="Process_Oczekiwanie" name="Realizacja zamówienia międzybibliotecznego" isExecutable="false">
    <bpmn:laneSet id="LaneSet_1">
      <bpmn:lane id="Lane_Bibliotekarz" name="Bibliotekarz wypożyczalni międzybibliotecznej">
        <bpmn:flowNodeRef>Start_Przyjete</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gw_Wyslij</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Wyslanie</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gw_Czekaj</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gw_Odpowiedz</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Catch_Egzemplarz</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Catch_Odmowa</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Catch_14dni</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Przyjecie</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>End_Przyjety</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gw_Ponaglono</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Ponaglenie</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gw_Brak</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gw_Inna</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_Wybor</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_System" name="System biblioteczny">
        <bpmn:flowNodeRef>Task_Informacja</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>End_Niezrealizowane</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="Start_Przyjete" name="Zamówienie przyjęte do realizacji" />
    <bpmn:exclusiveGateway id="Gw_Wyslij" />
    <bpmn:sendTask id="Task_Wyslanie" name="Wysłanie zamówienia" messageRef="Msg_Zamowienie" />
    <bpmn:exclusiveGateway id="Gw_Czekaj" />
    <bpmn:eventBasedGateway id="Gw_Odpowiedz" name="Co nastąpi pierwsze?" />
    <bpmn:intermediateCatchEvent id="Catch_Egzemplarz" name="Egzemplarz otrzymany">
      <bpmn:messageEventDefinition id="Catch_Egzemplarz_def" messageRef="Msg_Przesylka" />
    </bpmn:intermediateCatchEvent>
    <bpmn:intermediateCatchEvent id="Catch_Odmowa" name="Odmowa otrzymana">
      <bpmn:messageEventDefinition id="Catch_Odmowa_def" messageRef="Msg_Odmowa" />
    </bpmn:intermediateCatchEvent>
    <bpmn:intermediateCatchEvent id="Catch_14dni" name="Minęło 14 dni">
      <bpmn:timerEventDefinition id="Catch_14dni_def">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">P14D</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:intermediateCatchEvent>
    <bpmn:userTask id="Task_Przyjecie" name="Przyjęcie egzemplarza" />
    <bpmn:endEvent id="End_Przyjety" name="Egzemplarz przyjęty" />
    <bpmn:exclusiveGateway id="Gw_Ponaglono" name="Czy wysłano już ponaglenie?" />
    <bpmn:sendTask id="Task_Ponaglenie" name="Wysłanie ponaglenia" messageRef="Msg_Ponaglenie" />
    <bpmn:exclusiveGateway id="Gw_Brak" />
    <bpmn:exclusiveGateway id="Gw_Inna" name="Czy inna biblioteka ma egzemplarz?" />
    <bpmn:userTask id="Task_Wybor" name="Wybór innej biblioteki" />
    <bpmn:serviceTask id="Task_Informacja" name="Powiadomienie czytelnika o niepowodzeniu" />
    <bpmn:endEvent id="End_Niezrealizowane" name="Zamówienie niezrealizowane" />
    <bpmn:sequenceFlow id="F1" sourceRef="Start_Przyjete" targetRef="Gw_Wyslij" />
    <bpmn:sequenceFlow id="F2" sourceRef="Gw_Wyslij" targetRef="Task_Wyslanie" />
    <bpmn:sequenceFlow id="F3" sourceRef="Task_Wyslanie" targetRef="Gw_Czekaj" />
    <bpmn:sequenceFlow id="F4" sourceRef="Gw_Czekaj" targetRef="Gw_Odpowiedz" />
    <bpmn:sequenceFlow id="F5" sourceRef="Gw_Odpowiedz" targetRef="Catch_Egzemplarz" />
    <bpmn:sequenceFlow id="F6" sourceRef="Gw_Odpowiedz" targetRef="Catch_Odmowa" />
    <bpmn:sequenceFlow id="F7" sourceRef="Gw_Odpowiedz" targetRef="Catch_14dni" />
    <bpmn:sequenceFlow id="F8" sourceRef="Catch_Egzemplarz" targetRef="Task_Przyjecie" />
    <bpmn:sequenceFlow id="F9" sourceRef="Task_Przyjecie" targetRef="End_Przyjety" />
    <bpmn:sequenceFlow id="F10" sourceRef="Catch_14dni" targetRef="Gw_Ponaglono" />
    <bpmn:sequenceFlow id="F11" name="nie" sourceRef="Gw_Ponaglono" targetRef="Task_Ponaglenie" />
    <bpmn:sequenceFlow id="F12" sourceRef="Task_Ponaglenie" targetRef="Gw_Czekaj" />
    <bpmn:sequenceFlow id="F13" name="tak" sourceRef="Gw_Ponaglono" targetRef="Gw_Brak" />
    <bpmn:sequenceFlow id="F14" sourceRef="Catch_Odmowa" targetRef="Gw_Brak" />
    <bpmn:sequenceFlow id="F15" sourceRef="Gw_Brak" targetRef="Gw_Inna" />
    <bpmn:sequenceFlow id="F16" name="tak" sourceRef="Gw_Inna" targetRef="Task_Wybor" />
    <bpmn:sequenceFlow id="F17" sourceRef="Task_Wybor" targetRef="Gw_Wyslij" />
    <bpmn:sequenceFlow id="F18" name="nie" sourceRef="Gw_Inna" targetRef="Task_Informacja" />
    <bpmn:sequenceFlow id="F19" sourceRef="Task_Informacja" targetRef="End_Niezrealizowane" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_Oczekiwanie">
      <bpmndi:BPMNShape id="Participant_Biblioteka_di" bpmnElement="Participant_Biblioteka" isHorizontal="true">
        <dc:Bounds x="0" y="0" width="1330" height="630" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_Udostepniajaca_di" bpmnElement="Participant_Udostepniajaca" isHorizontal="true">
        <dc:Bounds x="0" y="670" width="1330" height="70" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_Bibliotekarz_di" bpmnElement="Lane_Bibliotekarz" isHorizontal="true">
        <dc:Bounds x="30" y="0" width="1300" height="490" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_System_di" bpmnElement="Lane_System" isHorizontal="true">
        <dc:Bounds x="30" y="490" width="1300" height="140" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Start_Przyjete_di" bpmnElement="Start_Przyjete">
        <dc:Bounds x="90" y="52" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="54" y="93" width="108" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gw_Wyslij_di" bpmnElement="Gw_Wyslij" isMarkerVisible="true">
        <dc:Bounds x="176" y="45" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Wyslanie_di" bpmnElement="Task_Wyslanie">
        <dc:Bounds x="276" y="30" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gw_Czekaj_di" bpmnElement="Gw_Czekaj" isMarkerVisible="true">
        <dc:Bounds x="426" y="45" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gw_Odpowiedz_di" bpmnElement="Gw_Odpowiedz">
        <dc:Bounds x="526" y="45" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="556" y="32" width="112" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Catch_Egzemplarz_di" bpmnElement="Catch_Egzemplarz">
        <dc:Bounds x="626" y="52" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="616" y="93" width="56" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Catch_Odmowa_di" bpmnElement="Catch_Odmowa">
        <dc:Bounds x="626" y="160" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="618" y="201" width="52" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Catch_14dni_di" bpmnElement="Catch_14dni">
        <dc:Bounds x="626" y="268" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="618" y="309" width="52" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Przyjecie_di" bpmnElement="Task_Przyjecie">
        <dc:Bounds x="712" y="30" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_Przyjety_di" bpmnElement="End_Przyjety">
        <dc:Bounds x="894" y="52" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="858" y="93" width="108" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gw_Ponaglono_di" bpmnElement="Gw_Ponaglono" isMarkerVisible="true">
        <dc:Bounds x="737" y="261" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="720" y="235" width="84" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Ponaglenie_di" bpmnElement="Task_Ponaglenie">
        <dc:Bounds x="862" y="376" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gw_Brak_di" bpmnElement="Gw_Brak" isMarkerVisible="true">
        <dc:Bounds x="887" y="261" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gw_Inna_di" bpmnElement="Gw_Inna" isMarkerVisible="true">
        <dc:Bounds x="1012" y="261" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="983" y="235" width="108" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Wybor_di" bpmnElement="Task_Wybor">
        <dc:Bounds x="1112" y="246" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Task_Informacja_di" bpmnElement="Task_Informacja">
        <dc:Bounds x="1112" y="520" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_Niezrealizowane_di" bpmnElement="End_Niezrealizowane">
        <dc:Bounds x="1262" y="542" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1238" y="583" width="84" height="23" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="MF_Zamowienie_di" bpmnElement="MF_Zamowienie">
        <di:waypoint x="326" y="110" />
        <di:waypoint x="326" y="670" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="332" y="378" width="56" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="MF_Ponaglenie_di" bpmnElement="MF_Ponaglenie">
        <di:waypoint x="920" y="456" />
        <di:waypoint x="920" y="670" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="926" y="654" width="56" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="MF_Przesylka_di" bpmnElement="MF_Przesylka">
        <di:waypoint x="612" y="670" />
        <di:waypoint x="612" y="78" />
        <di:waypoint x="628" y="78" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="617" y="362" width="52" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="MF_Odmowa_di" bpmnElement="MF_Odmowa">
        <di:waypoint x="682" y="670" />
        <di:waypoint x="682" y="186" />
        <di:waypoint x="660" y="186" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="688" y="416" width="34" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F1_di" bpmnElement="F1">
        <di:waypoint x="126" y="70" />
        <di:waypoint x="176" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F2_di" bpmnElement="F2">
        <di:waypoint x="226" y="70" />
        <di:waypoint x="276" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F3_di" bpmnElement="F3">
        <di:waypoint x="376" y="70" />
        <di:waypoint x="426" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F4_di" bpmnElement="F4">
        <di:waypoint x="476" y="70" />
        <di:waypoint x="526" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F5_di" bpmnElement="F5">
        <di:waypoint x="576" y="70" />
        <di:waypoint x="626" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F6_di" bpmnElement="F6">
        <di:waypoint x="551" y="95" />
        <di:waypoint x="551" y="178" />
        <di:waypoint x="626" y="178" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F7_di" bpmnElement="F7">
        <di:waypoint x="551" y="95" />
        <di:waypoint x="551" y="286" />
        <di:waypoint x="626" y="286" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F8_di" bpmnElement="F8">
        <di:waypoint x="662" y="70" />
        <di:waypoint x="712" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F9_di" bpmnElement="F9">
        <di:waypoint x="812" y="70" />
        <di:waypoint x="894" y="70" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F10_di" bpmnElement="F10">
        <di:waypoint x="662" y="286" />
        <di:waypoint x="737" y="286" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F11_di" bpmnElement="F11">
        <di:waypoint x="762" y="311" />
        <di:waypoint x="762" y="416" />
        <di:waypoint x="862" y="416" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="769" y="401" width="18" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F12_di" bpmnElement="F12">
        <di:waypoint x="904" y="456" />
        <di:waypoint x="904" y="489" />
        <di:waypoint x="451" y="489" />
        <di:waypoint x="451" y="95" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F13_di" bpmnElement="F13">
        <di:waypoint x="787" y="286" />
        <di:waypoint x="887" y="286" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="794" y="271" width="18" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F14_di" bpmnElement="F14">
        <di:waypoint x="662" y="178" />
        <di:waypoint x="912" y="178" />
        <di:waypoint x="912" y="261" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F15_di" bpmnElement="F15">
        <di:waypoint x="937" y="286" />
        <di:waypoint x="1012" y="286" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F16_di" bpmnElement="F16">
        <di:waypoint x="1062" y="286" />
        <di:waypoint x="1112" y="286" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1069" y="271" width="18" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F17_di" bpmnElement="F17">
        <di:waypoint x="1162" y="246" />
        <di:waypoint x="1162" y="25" />
        <di:waypoint x="201" y="25" />
        <di:waypoint x="201" y="45" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F18_di" bpmnElement="F18">
        <di:waypoint x="1037" y="311" />
        <di:waypoint x="1037" y="560" />
        <di:waypoint x="1112" y="560" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1044" y="545" width="18" height="11" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="F19_di" bpmnElement="F19">
        <di:waypoint x="1212" y="560" />
        <di:waypoint x="1262" y="560" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
