<?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_Process_massazh_i_spa" targetNamespace="https://stackum.ru/bpmn" exporter="Стэкум" exporterVersion="1">
  <bpmn:collaboration id="Collaboration_Process_massazh_i_spa">
    <bpmn:participant id="Participant_Process_massazh_i_spa" name="Процедура по подарочному сертификату" processRef="Process_massazh_i_spa"/>
  </bpmn:collaboration>
  <bpmn:process id="Process_massazh_i_spa" name="Процедура по подарочному сертификату" isExecutable="false">
    <bpmn:laneSet id="LaneSet_Process_massazh_i_spa">
      <bpmn:lane id="Lane_client" name="Клиент">
        <bpmn:flowNodeRef>start</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>book</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>cert</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_system" name="Стэкум">
        <bpmn:flowNodeRef>room</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>remind</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>gw</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>rest</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>end</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_master" name="Мастер">
        <bpmn:flowNodeRef>approve</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>proc</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>card</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="start" name="Клиенту подарили сертификат"></bpmn:startEvent>
    <bpmn:userTask id="book" name="Записывается на процедуру"></bpmn:userTask>
    <bpmn:serviceTask id="room" name="Занимает кабинет и время мастера"></bpmn:serviceTask>
    <bpmn:userTask id="approve" name="Подтверждает заявку"></bpmn:userTask>
    <bpmn:sendTask id="remind" name="Напоминает накануне в MAX"></bpmn:sendTask>
    <bpmn:userTask id="proc" name="Проводит процедуру"></bpmn:userTask>
    <bpmn:userTask id="cert" name="Называет код сертификата"></bpmn:userTask>
    <bpmn:exclusiveGateway id="gw" name="Остатка хватает?"></bpmn:exclusiveGateway>
    <bpmn:serviceTask id="rest" name="Списывает стоимость, хранит остаток"></bpmn:serviceTask>
    <bpmn:userTask id="card" name="Доплата картой или наличными в том же чеке"></bpmn:userTask>
    <bpmn:endEvent id="end" name="Визит закрыт"></bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1_start_book" sourceRef="start" targetRef="book"/>
    <bpmn:sequenceFlow id="Flow_2_book_room" sourceRef="book" targetRef="room"/>
    <bpmn:sequenceFlow id="Flow_3_room_approve" sourceRef="room" targetRef="approve"/>
    <bpmn:sequenceFlow id="Flow_4_approve_remind" sourceRef="approve" targetRef="remind"/>
    <bpmn:sequenceFlow id="Flow_5_remind_proc" sourceRef="remind" targetRef="proc"/>
    <bpmn:sequenceFlow id="Flow_6_proc_cert" sourceRef="proc" targetRef="cert"/>
    <bpmn:sequenceFlow id="Flow_7_cert_gw" sourceRef="cert" targetRef="gw"/>
    <bpmn:sequenceFlow id="Flow_8_gw_rest" sourceRef="gw" targetRef="rest" name="Да"/>
    <bpmn:sequenceFlow id="Flow_9_gw_card" sourceRef="gw" targetRef="card" name="Нет"/>
    <bpmn:sequenceFlow id="Flow_10_rest_end" sourceRef="rest" targetRef="end"/>
    <bpmn:sequenceFlow id="Flow_11_card_end" sourceRef="card" targetRef="end"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="Diagram_Process_massazh_i_spa">
    <bpmndi:BPMNPlane id="Plane_Process_massazh_i_spa" bpmnElement="Collaboration_Process_massazh_i_spa">
      <bpmndi:BPMNShape id="Participant_di" bpmnElement="Participant_Process_massazh_i_spa" isHorizontal="true"><dc:Bounds x="0" y="0" width="1844" height="396"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_client_di" bpmnElement="Lane_client" isHorizontal="true"><dc:Bounds x="44" y="0" width="1800" height="132"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_system_di" bpmnElement="Lane_system" isHorizontal="true"><dc:Bounds x="44" y="132" width="1800" height="132"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_master_di" bpmnElement="Lane_master" isHorizontal="true"><dc:Bounds x="44" y="264" width="1800" height="132"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="start_di" bpmnElement="start"><dc:Bounds x="134" y="48" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="book_di" bpmnElement="book"><dc:Bounds x="262" y="32" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="room_di" bpmnElement="room"><dc:Bounds x="438" y="164" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="approve_di" bpmnElement="approve"><dc:Bounds x="614" y="296" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="remind_di" bpmnElement="remind"><dc:Bounds x="790" y="164" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="proc_di" bpmnElement="proc"><dc:Bounds x="966" y="296" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="cert_di" bpmnElement="cert"><dc:Bounds x="1142" y="32" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="gw_di" bpmnElement="gw" isMarkerVisible="true"><dc:Bounds x="1361" y="175" width="46" height="46"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="rest_di" bpmnElement="rest"><dc:Bounds x="1494" y="164" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="card_di" bpmnElement="card"><dc:Bounds x="1494" y="296" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="end_di" bpmnElement="end"><dc:Bounds x="1718" y="180" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_start_book_di" bpmnElement="Flow_1_start_book"><di:waypoint x="170" y="66"/><di:waypoint x="262" y="66"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_book_room_di" bpmnElement="Flow_2_book_room"><di:waypoint x="394" y="66"/><di:waypoint x="414" y="66"/><di:waypoint x="414" y="198"/><di:waypoint x="438" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_room_approve_di" bpmnElement="Flow_3_room_approve"><di:waypoint x="570" y="198"/><di:waypoint x="590" y="198"/><di:waypoint x="590" y="330"/><di:waypoint x="614" y="330"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_approve_remind_di" bpmnElement="Flow_4_approve_remind"><di:waypoint x="746" y="330"/><di:waypoint x="766" y="330"/><di:waypoint x="766" y="198"/><di:waypoint x="790" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_remind_proc_di" bpmnElement="Flow_5_remind_proc"><di:waypoint x="922" y="198"/><di:waypoint x="942" y="198"/><di:waypoint x="942" y="330"/><di:waypoint x="966" y="330"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_proc_cert_di" bpmnElement="Flow_6_proc_cert"><di:waypoint x="1098" y="330"/><di:waypoint x="1118" y="330"/><di:waypoint x="1118" y="66"/><di:waypoint x="1142" y="66"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_cert_gw_di" bpmnElement="Flow_7_cert_gw"><di:waypoint x="1274" y="66"/><di:waypoint x="1294" y="66"/><di:waypoint x="1294" y="198"/><di:waypoint x="1361" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_gw_rest_di" bpmnElement="Flow_8_gw_rest"><di:waypoint x="1407" y="198"/><di:waypoint x="1494" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_gw_card_di" bpmnElement="Flow_9_gw_card"><di:waypoint x="1384" y="221"/><di:waypoint x="1384" y="330"/><di:waypoint x="1494" y="330"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_rest_end_di" bpmnElement="Flow_10_rest_end"><di:waypoint x="1626" y="198"/><di:waypoint x="1718" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_card_end_di" bpmnElement="Flow_11_card_end"><di:waypoint x="1626" y="330"/><di:waypoint x="1646" y="330"/><di:waypoint x="1646" y="198"/><di:waypoint x="1718" y="198"/></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
