<?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_parikmaherskie_i_barbershopy" targetNamespace="https://stackum.ru/bpmn" exporter="Стэкум" exporterVersion="1">
  <bpmn:collaboration id="Collaboration_Process_parikmaherskie_i_barbershopy">
    <bpmn:participant id="Participant_Process_parikmaherskie_i_barbershopy" name="Стрижка и повторный визит" processRef="Process_parikmaherskie_i_barbershopy"/>
  </bpmn:collaboration>
  <bpmn:process id="Process_parikmaherskie_i_barbershopy" name="Стрижка и повторный визит" isExecutable="false">
    <bpmn:laneSet id="LaneSet_Process_parikmaherskie_i_barbershopy">
      <bpmn:lane id="Lane_client" name="Клиент">
        <bpmn:flowNodeRef>start</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>book</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>self</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>end</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_system" name="Стэкум">
        <bpmn:flowNodeRef>assign</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>remind</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>pct</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>gw</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>wait</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>again</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_master" name="Мастер">
        <bpmn:flowNodeRef>approve</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>cut</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>pay</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="start" name="Клиенту пора подстричься"></bpmn:startEvent>
    <bpmn:userTask id="book" name="Выбирает время, «Любой мастер»"></bpmn:userTask>
    <bpmn:serviceTask id="assign" name="Назначает мастера по правилу"></bpmn:serviceTask>
    <bpmn:userTask id="approve" name="Подтверждает заявку"></bpmn:userTask>
    <bpmn:sendTask id="remind" name="Напоминает накануне во ВКонтакте"></bpmn:sendTask>
    <bpmn:userTask id="cut" name="Стрижёт и отмечает визит"></bpmn:userTask>
    <bpmn:userTask id="pay" name="Принимает оплату"></bpmn:userTask>
    <bpmn:serviceTask id="pct" name="Начисляет процент мастеру"></bpmn:serviceTask>
    <bpmn:exclusiveGateway id="gw" name="Повторные визиты автоматически?"></bpmn:exclusiveGateway>
    <bpmn:endEvent id="self" name="Клиент вернётся сам"></bpmn:endEvent>
    <bpmn:intermediateCatchEvent id="wait" name="Через 30 дней"><bpmn:timerEventDefinition/></bpmn:intermediateCatchEvent>
    <bpmn:sendTask id="again" name="Приглашает записаться снова"></bpmn:sendTask>
    <bpmn:endEvent id="end" name="Клиент записан повторно"></bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1_start_book" sourceRef="start" targetRef="book"/>
    <bpmn:sequenceFlow id="Flow_2_book_assign" sourceRef="book" targetRef="assign"/>
    <bpmn:sequenceFlow id="Flow_3_assign_approve" sourceRef="assign" targetRef="approve"/>
    <bpmn:sequenceFlow id="Flow_4_approve_remind" sourceRef="approve" targetRef="remind"/>
    <bpmn:sequenceFlow id="Flow_5_remind_cut" sourceRef="remind" targetRef="cut"/>
    <bpmn:sequenceFlow id="Flow_6_cut_pay" sourceRef="cut" targetRef="pay"/>
    <bpmn:sequenceFlow id="Flow_7_pay_pct" sourceRef="pay" targetRef="pct"/>
    <bpmn:sequenceFlow id="Flow_8_pct_gw" sourceRef="pct" targetRef="gw"/>
    <bpmn:sequenceFlow id="Flow_9_gw_self" sourceRef="gw" targetRef="self" name="Нет"/>
    <bpmn:sequenceFlow id="Flow_10_gw_wait" sourceRef="gw" targetRef="wait" name="Да"/>
    <bpmn:sequenceFlow id="Flow_11_wait_again" sourceRef="wait" targetRef="again"/>
    <bpmn:sequenceFlow id="Flow_12_again_end" sourceRef="again" targetRef="end"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="Diagram_Process_parikmaherskie_i_barbershopy">
    <bpmndi:BPMNPlane id="Plane_Process_parikmaherskie_i_barbershopy" bpmnElement="Collaboration_Process_parikmaherskie_i_barbershopy">
      <bpmndi:BPMNShape id="Participant_di" bpmnElement="Participant_Process_parikmaherskie_i_barbershopy" isHorizontal="true"><dc:Bounds x="0" y="0" width="2196" height="396"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_client_di" bpmnElement="Lane_client" isHorizontal="true"><dc:Bounds x="44" y="0" width="2152" height="132"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_system_di" bpmnElement="Lane_system" isHorizontal="true"><dc:Bounds x="44" y="132" width="2152" height="132"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_master_di" bpmnElement="Lane_master" isHorizontal="true"><dc:Bounds x="44" y="264" width="2152" 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="assign_di" bpmnElement="assign"><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="cut_di" bpmnElement="cut"><dc:Bounds x="966" y="296" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="pay_di" bpmnElement="pay"><dc:Bounds x="1142" y="296" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="pct_di" bpmnElement="pct"><dc:Bounds x="1318" y="164" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="gw_di" bpmnElement="gw" isMarkerVisible="true"><dc:Bounds x="1537" y="175" width="46" height="46"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="self_di" bpmnElement="self"><dc:Bounds x="1718" y="48" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="wait_di" bpmnElement="wait"><dc:Bounds x="1718" y="180" width="36" height="36"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="again_di" bpmnElement="again"><dc:Bounds x="1846" y="164" width="132" height="68"/></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="end_di" bpmnElement="end"><dc:Bounds x="2070" y="48" 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_assign_di" bpmnElement="Flow_2_book_assign"><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_assign_approve_di" bpmnElement="Flow_3_assign_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_cut_di" bpmnElement="Flow_5_remind_cut"><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_cut_pay_di" bpmnElement="Flow_6_cut_pay"><di:waypoint x="1098" y="330"/><di:waypoint x="1142" y="330"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_pay_pct_di" bpmnElement="Flow_7_pay_pct"><di:waypoint x="1274" y="330"/><di:waypoint x="1294" y="330"/><di:waypoint x="1294" y="198"/><di:waypoint x="1318" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_pct_gw_di" bpmnElement="Flow_8_pct_gw"><di:waypoint x="1450" y="198"/><di:waypoint x="1537" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_gw_self_di" bpmnElement="Flow_9_gw_self"><di:waypoint x="1560" y="175"/><di:waypoint x="1560" y="66"/><di:waypoint x="1718" y="66"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_gw_wait_di" bpmnElement="Flow_10_gw_wait"><di:waypoint x="1583" y="198"/><di:waypoint x="1718" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_wait_again_di" bpmnElement="Flow_11_wait_again"><di:waypoint x="1754" y="198"/><di:waypoint x="1846" y="198"/></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12_again_end_di" bpmnElement="Flow_12_again_end"><di:waypoint x="1978" y="198"/><di:waypoint x="1998" y="198"/><di:waypoint x="1998" y="66"/><di:waypoint x="2070" y="66"/></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
