<?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_1" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn:collaboration id="Collaboration_1">
    <bpmn:participant id="Participant_Main" name="MDM: Бесплатное нулевое ТО для Haval" processRef="Process_1"/>
  </bpmn:collaboration>
  <bpmn:process id="Process_1" isExecutable="false">
    <bpmn:laneSet id="LaneSet_1">
      <bpmn:lane id="Lane_0" name="Клиент">
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-2</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-8</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-9</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-12</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_to_0_booked</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_1" name="SM-BFF">
        <bpmn:flowNodeRef>Task_step-3</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-7</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_2" name="PCM">
        <bpmn:flowNodeRef>Task_step-4</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-5</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-6</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>GW_1</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_3" name="Order-registry">
        <bpmn:flowNodeRef>Task_step-10</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_4" name="RMS">
        <bpmn:flowNodeRef>Task_step-11</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="StartEvent_1" name="Клиент хочет записаться на ТО.">
      <bpmn:outgoing>Flow_start_step_1</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="Task_step-1" name="Клиент добавляет автомобиль в гараж">
      <bpmn:documentation>Клиент добавляет свой автомобиль в мобильное приложение, указывая необходимые данные.
Система: Приложение, Garage
Время: 2-5 мин</bpmn:documentation>
      <bpmn:incoming>Flow_startevent_1_step_1</bpmn:incoming>
      <bpmn:outgoing>Flow_step_1_step_2</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:userTask id="Task_step-2" name="Клиент выбирает запись на ТО">
      <bpmn:documentation>Клиент инициирует процесс записи на ТО через приложение.
Система: Приложение
Время: 1 мин</bpmn:documentation>
      <bpmn:incoming>Flow_step_1_step_2</bpmn:incoming>
      <bpmn:outgoing>Flow_step_2_step_3</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="Task_step-3" name="SM-BFF запрашивает предложения ТО">
      <bpmn:documentation>SM-BFF формирует запрос к PCM для получения списка доступных регламентов ТО.
Система: SM-BFF, Garage
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_2_step_3</bpmn:incoming>
      <bpmn:outgoing>Flow_step_3_step_4</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-4" name="PCM запрашивает регламенты из Pimcore">
      <bpmn:documentation>PCM запрашивает соответствующие регламенты ТО из MDM (Pimcore).
Система: PCM, MDM (Pimcore)
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_3_step_4</bpmn:incoming>
      <bpmn:outgoing>Flow_step_4_gw_1</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-5" name="PCM устанавливает цену 0 для ТО-0">
      <bpmn:documentation>PCM устанавливает стоимость ТО-0 равной 0, минуя Pricer.
Система: PCM
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_gw_1_step_5</bpmn:incoming>
      <bpmn:outgoing>Flow_step_5_step_7</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-6" name="PCM рассчитывает стандартную цену">
      <bpmn:documentation>PCM рассчитывает стоимость ТО через Pricer по стандартному тарифу.
Система: PCM, Pricer
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_gw_1_step_6</bpmn:incoming>
      <bpmn:outgoing>Flow_step_6_step_7</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-7" name="SM-BFF обрабатывает предложения ТО">
      <bpmn:documentation>SM-BFF обрабатывает полученные предложения и добавляет флаг предупреждения для ТО-0.
Система: SM-BFF
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_5_step_7</bpmn:incoming>
      <bpmn:incoming>Flow_step_6_step_7</bpmn:incoming>
      <bpmn:outgoing>Flow_step_7_step_8</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:userTask id="Task_step-8" name="Приложение отображает предложения ТО">
      <bpmn:documentation>Приложение отображает клиенту доступные регламенты ТО с ценами и предупреждениями.
Система: Приложение
Время: 1-2 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_7_step_8</bpmn:incoming>
      <bpmn:outgoing>Flow_step_8_step_9</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:userTask id="Task_step-9" name="Клиент выбирает ТО-0">
      <bpmn:documentation>Клиент выбирает бесплатное ТО-0 и удобное время.
Система: Приложение
Время: 1 мин</bpmn:documentation>
      <bpmn:incoming>Flow_step_8_step_9</bpmn:incoming>
      <bpmn:outgoing>Flow_step_9_step_10</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="Task_step-10" name="Order-registry создает заказ">
      <bpmn:documentation>Order-registry создает заказ с флагом `no_payment = true`.
Система: Order-registry
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_9_step_10</bpmn:incoming>
      <bpmn:outgoing>Flow_step_10_step_11</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-11" name="RMS бронирует слот">
      <bpmn:documentation>RMS бронирует слот для ТО-0.
Система: RMS
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_10_step_11</bpmn:incoming>
      <bpmn:outgoing>Flow_step_11_step_12</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:userTask id="Task_step-12" name="Клиент получает подтверждение">
      <bpmn:documentation>Клиент видит подтверждение успешной записи на ТО-0.
Система: Приложение
Время: &lt;1 сек</bpmn:documentation>
      <bpmn:incoming>Flow_step_11_step_12</bpmn:incoming>
      <bpmn:outgoing>Flow_step_12_end_to_0_booked</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="GW_1" name="Регламент ТО-0 найден и имеет `pricing_policy = free_labor`?">
      <bpmn:incoming>Flow_step_4_gw_1</bpmn:incoming>
      <bpmn:outgoing>Flow_gw_1_step_5</bpmn:outgoing>
      <bpmn:outgoing>Flow_gw_1_step_6</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:endEvent id="EndEvent_to_0_booked" name="на бесплатное ТО-0">
      <bpmn:documentation>Клиент успешно записан на бесплатное ТО-0.</bpmn:documentation>
      <bpmn:incoming>Flow_step_12_end_to_0_booked</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_startevent_1_step_1" sourceRef="StartEvent_1" targetRef="Task_step-1"/>
    <bpmn:sequenceFlow id="Flow_step_1_step_2" sourceRef="Task_step-1" targetRef="Task_step-2"/>
    <bpmn:sequenceFlow id="Flow_step_2_step_3" sourceRef="Task_step-2" targetRef="Task_step-3"/>
    <bpmn:sequenceFlow id="Flow_step_3_step_4" sourceRef="Task_step-3" targetRef="Task_step-4"/>
    <bpmn:sequenceFlow id="Flow_step_4_gw_1" sourceRef="Task_step-4" targetRef="GW_1"/>
    <bpmn:sequenceFlow id="Flow_gw_1_step_5" sourceRef="GW_1" targetRef="Task_step-5" name="ДА">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">ДА</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_gw_1_step_6" sourceRef="GW_1" targetRef="Task_step-6" name="НЕТ">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">НЕТ</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_step_5_step_7" sourceRef="Task_step-5" targetRef="Task_step-7"/>
    <bpmn:sequenceFlow id="Flow_step_6_step_7" sourceRef="Task_step-6" targetRef="Task_step-7"/>
    <bpmn:sequenceFlow id="Flow_step_7_step_8" sourceRef="Task_step-7" targetRef="Task_step-8"/>
    <bpmn:sequenceFlow id="Flow_step_8_step_9" sourceRef="Task_step-8" targetRef="Task_step-9"/>
    <bpmn:sequenceFlow id="Flow_step_9_step_10" sourceRef="Task_step-9" targetRef="Task_step-10"/>
    <bpmn:sequenceFlow id="Flow_step_10_step_11" sourceRef="Task_step-10" targetRef="Task_step-11"/>
    <bpmn:sequenceFlow id="Flow_step_11_step_12" sourceRef="Task_step-11" targetRef="Task_step-12"/>
    <bpmn:sequenceFlow id="Flow_step_12_end_to_0_booked" sourceRef="Task_step-12" targetRef="EndEvent_to_0_booked"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1">
      <bpmndi:BPMNShape id="Shape_Participant" bpmnElement="Participant_Main" isHorizontal="true">
        <dc:Bounds x="120" y="60" width="4100" height="1100"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_0" bpmnElement="Lane_0" isHorizontal="true">
        <dc:Bounds x="150" y="60" width="4070" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_1" bpmnElement="Lane_1" isHorizontal="true">
        <dc:Bounds x="150" y="280" width="4070" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_2" bpmnElement="Lane_2" isHorizontal="true">
        <dc:Bounds x="150" y="500" width="4070" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_3" bpmnElement="Lane_3" isHorizontal="true">
        <dc:Bounds x="150" y="720" width="4070" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_4" bpmnElement="Lane_4" isHorizontal="true">
        <dc:Bounds x="150" y="940" width="4070" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Start" bpmnElement="StartEvent_1">
        <dc:Bounds x="200" y="152" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-1" bpmnElement="Task_step-1">
        <dc:Bounds x="280" y="125" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-2" bpmnElement="Task_step-2">
        <dc:Bounds x="540" y="125" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-3" bpmnElement="Task_step-3">
        <dc:Bounds x="800" y="345" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-4" bpmnElement="Task_step-4">
        <dc:Bounds x="1060" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_GW_1" bpmnElement="GW_1" isMarkerVisible="true">
        <dc:Bounds x="1320" y="585" width="50" height="50"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-5" bpmnElement="Task_step-5">
        <dc:Bounds x="1580" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-6" bpmnElement="Task_step-6">
        <dc:Bounds x="1840" y="510" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-7" bpmnElement="Task_step-7">
        <dc:Bounds x="1840" y="345" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-8" bpmnElement="Task_step-8">
        <dc:Bounds x="2100" y="125" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-9" bpmnElement="Task_step-9">
        <dc:Bounds x="2360" y="125" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-10" bpmnElement="Task_step-10">
        <dc:Bounds x="2620" y="785" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-11" bpmnElement="Task_step-11">
        <dc:Bounds x="2880" y="1005" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-12" bpmnElement="Task_step-12">
        <dc:Bounds x="3140" y="125" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_EndEvent_to_0_booked" bpmnElement="EndEvent_to_0_booked">
        <dc:Bounds x="3400" y="152" width="36" height="36"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Edge_Flow_startevent_1_step_1" bpmnElement="Flow_startevent_1_step_1">
        <di:waypoint x="236" y="170"/>
        <di:waypoint x="280" y="170"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_1_step_2" bpmnElement="Flow_step_1_step_2">
        <di:waypoint x="450" y="170"/>
        <di:waypoint x="540" y="170"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_2_step_3" bpmnElement="Flow_step_2_step_3">
        <di:waypoint x="710" y="170"/>
        <di:waypoint x="735" y="170"/>
        <di:waypoint x="735" y="390"/>
        <di:waypoint x="800" y="390"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_3_step_4" bpmnElement="Flow_step_3_step_4">
        <di:waypoint x="970" y="390"/>
        <di:waypoint x="995" y="390"/>
        <di:waypoint x="995" y="610"/>
        <di:waypoint x="1060" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_4_gw_1" bpmnElement="Flow_step_4_gw_1">
        <di:waypoint x="1230" y="610"/>
        <di:waypoint x="1320" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_gw_1_step_5" bpmnElement="Flow_gw_1_step_5">
        <di:waypoint x="1370" y="610"/>
        <di:waypoint x="1580" y="610"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1375" y="592" width="40" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_gw_1_step_6" bpmnElement="Flow_gw_1_step_6">
        <di:waypoint x="1345" y="585"/>
        <di:waypoint x="1345" y="502"/>
        <di:waypoint x="1925" y="502"/>
        <di:waypoint x="1925" y="510"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1353" y="553" width="40" height="14"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_5_step_7" bpmnElement="Flow_step_5_step_7">
        <di:waypoint x="1750" y="610"/>
        <di:waypoint x="1775" y="610"/>
        <di:waypoint x="1775" y="390"/>
        <di:waypoint x="1840" y="390"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_6_step_7" bpmnElement="Flow_step_6_step_7">
        <di:waypoint x="2010" y="555"/>
        <di:waypoint x="2030" y="555"/>
        <di:waypoint x="2030" y="390"/>
        <di:waypoint x="1840" y="390"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_7_step_8" bpmnElement="Flow_step_7_step_8">
        <di:waypoint x="2010" y="390"/>
        <di:waypoint x="2035" y="390"/>
        <di:waypoint x="2035" y="170"/>
        <di:waypoint x="2100" y="170"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_8_step_9" bpmnElement="Flow_step_8_step_9">
        <di:waypoint x="2270" y="170"/>
        <di:waypoint x="2360" y="170"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_9_step_10" bpmnElement="Flow_step_9_step_10">
        <di:waypoint x="2530" y="170"/>
        <di:waypoint x="2555" y="170"/>
        <di:waypoint x="2555" y="830"/>
        <di:waypoint x="2620" y="830"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_10_step_11" bpmnElement="Flow_step_10_step_11">
        <di:waypoint x="2790" y="830"/>
        <di:waypoint x="2815" y="830"/>
        <di:waypoint x="2815" y="1050"/>
        <di:waypoint x="2880" y="1050"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_11_step_12" bpmnElement="Flow_step_11_step_12">
        <di:waypoint x="3050" y="1050"/>
        <di:waypoint x="3075" y="1050"/>
        <di:waypoint x="3075" y="170"/>
        <di:waypoint x="3140" y="170"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_12_end_to_0_booked" bpmnElement="Flow_step_12_end_to_0_booked">
        <di:waypoint x="3310" y="170"/>
        <di:waypoint x="3400" y="170"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
