<?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="Процесс создания сервисного центра (СЦ) со складами через Bitrix24" 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:lane>
      <bpmn:lane id="Lane_1" name="Bitrix24">
        <bpmn:flowNodeRef>Task_step-2</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_2" name="Comunda">
        <bpmn:flowNodeRef>Task_step-3</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-5</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-6</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-7</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-8</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Task_step-10</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_3" name="Dadata">
        <bpmn:flowNodeRef>Task_step-4</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_4" name="1С">
        <bpmn:flowNodeRef>Task_step-9</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_5" name="RMS">
        <bpmn:flowNodeRef>Task_step-11</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent_ready</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="StartEvent_1" name="Руководитель запускает процесс создания СЦ в Bitri">
      <bpmn:outgoing>Flow_start_step_1</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="Task_step-1" name="Запуск процесса создания СЦ">
      <bpmn:documentation>Руководитель процесса инициирует создание нового сервисного центра в системе Bitrix24.
Система: Bitrix24
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_startevent_1_step_1</bpmn:incoming>
      <bpmn:outgoing>Flow_step_1_step_2</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="Task_step-2" name="Передача данных в Comunda">
      <bpmn:documentation>Bitrix24 передает полученные от пользователя данные в Comunda для дальнейшей оркестрации процесса.
Система: Bitrix24, Comunda
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_1_step_2</bpmn:incoming>
      <bpmn:outgoing>Flow_step_2_step_3</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-3" name="Запрос нормализованного адреса в Dadata">
      <bpmn:documentation>Comunda отправляет запрос в Dadata для получения нормализованного адреса и дополнительных атрибутов.
Система: Comunda, Dadata
Время: Не указано</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="Получение нормализованного адреса">
      <bpmn:documentation>Dadata обрабатывает запрос и возвращает нормализованный адрес, город и другие атрибуты.
Система: Dadata, Comunda
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_3_step_4</bpmn:incoming>
      <bpmn:outgoing>Flow_step_4_step_5</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-5" name="Формирование названия СЦ">
      <bpmn:documentation>Comunda формирует название СЦ в формате &quot;Serviceme + город&quot;. Если в городе уже есть СЦ, добавляется инкремент.
Система: Comunda
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_4_step_5</bpmn:incoming>
      <bpmn:outgoing>Flow_step_5_step_6</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-6" name="Создание СЦ в RMS">
      <bpmn:documentation>Comunda создает новый сервисный центр в системе RMS и привязывает его к выбранному франчайзи.
Система: Comunda, RMS
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_5_step_6</bpmn:incoming>
      <bpmn:outgoing>Flow_step_6_step_7</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-7" name="Создание адреса в Org Registry">
      <bpmn:documentation>Comunda создает запись об адресе в системе Org Registry.
Система: Comunda, Org Registry
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_6_step_7</bpmn:incoming>
      <bpmn:outgoing>Flow_step_7_step_8</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-8" name="Инициирование создания сущностей в 1С">
      <bpmn:documentation>Comunda инициирует создание подразделений, цехов и складов в системе 1С на основе адреса и франчайзи.
Система: Comunda, 1С
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_7_step_8</bpmn:incoming>
      <bpmn:outgoing>Flow_step_8_step_9</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-9" name="Возврат данных по складам из 1С">
      <bpmn:documentation>После создания подразделений, цехов и складов, 1С возвращает идентификаторы созданных складов в Comunda.
Система: 1С, Comunda
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_8_step_9</bpmn:incoming>
      <bpmn:outgoing>Flow_step_9_step_10</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Task_step-10" name="Создание складов в RMS">
      <bpmn:documentation>Comunda создает склады в RMS, используя полученные идентификаторы, и привязывает их к соответствующему СЦ, устанавливая корректные связи.
Система: Comunda, RMS
Время: Не указано</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="Инициализация остатков">
      <bpmn:documentation>Для корректной работы складского учета создается перемещение &quot;с себя на себя&quot; с датой перемещения &quot;-1 день&quot; для инициализации остатков.
Система: RMS
Время: Не указано</bpmn:documentation>
      <bpmn:incoming>Flow_step_10_step_11</bpmn:incoming>
      <bpmn:outgoing>Flow_step_11_end_ready</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="EndEvent_ready" name="СЦ создан в RMS">
      <bpmn:documentation>СЦ создан в RMS, адрес нормализован, подразделения, цеха и склады созданы в 1С, склады созданы и привязаны в RMS, инициализирован складской учёт, все системы находятся в консистентном состоянии.</bpmn:documentation>
      <bpmn:incoming>Flow_step_11_end_ready</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_step_5" sourceRef="Task_step-4" targetRef="Task_step-5"/>
    <bpmn:sequenceFlow id="Flow_step_5_step_6" sourceRef="Task_step-5" targetRef="Task_step-6"/>
    <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_end_ready" sourceRef="Task_step-11" targetRef="EndEvent_ready"/>
  </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="3840" height="1320"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_0" bpmnElement="Lane_0" isHorizontal="true">
        <dc:Bounds x="150" y="60" width="3810" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_1" bpmnElement="Lane_1" isHorizontal="true">
        <dc:Bounds x="150" y="280" width="3810" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_2" bpmnElement="Lane_2" isHorizontal="true">
        <dc:Bounds x="150" y="500" width="3810" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_3" bpmnElement="Lane_3" isHorizontal="true">
        <dc:Bounds x="150" y="720" width="3810" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_4" bpmnElement="Lane_4" isHorizontal="true">
        <dc:Bounds x="150" y="940" width="3810" height="220"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Lane_5" bpmnElement="Lane_5" isHorizontal="true">
        <dc:Bounds x="150" y="1160" width="3810" 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="345" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-3" bpmnElement="Task_step-3">
        <dc:Bounds x="800" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-4" bpmnElement="Task_step-4">
        <dc:Bounds x="1060" y="785" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-5" bpmnElement="Task_step-5">
        <dc:Bounds x="1320" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-6" bpmnElement="Task_step-6">
        <dc:Bounds x="1580" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-7" bpmnElement="Task_step-7">
        <dc:Bounds x="1840" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-8" bpmnElement="Task_step-8">
        <dc:Bounds x="2100" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-9" bpmnElement="Task_step-9">
        <dc:Bounds x="2360" y="1005" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-10" bpmnElement="Task_step-10">
        <dc:Bounds x="2620" y="565" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_Task_step-11" bpmnElement="Task_step-11">
        <dc:Bounds x="2880" y="1225" width="170" height="90"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Shape_EndEvent_ready" bpmnElement="EndEvent_ready">
        <dc:Bounds x="3140" y="1252" 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="475" y="170"/>
        <di:waypoint x="475" y="390"/>
        <di:waypoint x="540" y="390"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_2_step_3" bpmnElement="Flow_step_2_step_3">
        <di:waypoint x="710" y="390"/>
        <di:waypoint x="735" y="390"/>
        <di:waypoint x="735" y="610"/>
        <di:waypoint x="800" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_3_step_4" bpmnElement="Flow_step_3_step_4">
        <di:waypoint x="970" y="610"/>
        <di:waypoint x="995" y="610"/>
        <di:waypoint x="995" y="830"/>
        <di:waypoint x="1060" y="830"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_4_step_5" bpmnElement="Flow_step_4_step_5">
        <di:waypoint x="1230" y="830"/>
        <di:waypoint x="1255" y="830"/>
        <di:waypoint x="1255" y="610"/>
        <di:waypoint x="1320" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_5_step_6" bpmnElement="Flow_step_5_step_6">
        <di:waypoint x="1490" y="610"/>
        <di:waypoint x="1580" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_6_step_7" bpmnElement="Flow_step_6_step_7">
        <di:waypoint x="1750" y="610"/>
        <di:waypoint x="1840" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_7_step_8" bpmnElement="Flow_step_7_step_8">
        <di:waypoint x="2010" y="610"/>
        <di:waypoint x="2100" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_8_step_9" bpmnElement="Flow_step_8_step_9">
        <di:waypoint x="2270" y="610"/>
        <di:waypoint x="2295" y="610"/>
        <di:waypoint x="2295" y="1050"/>
        <di:waypoint x="2360" y="1050"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_9_step_10" bpmnElement="Flow_step_9_step_10">
        <di:waypoint x="2530" y="1050"/>
        <di:waypoint x="2555" y="1050"/>
        <di:waypoint x="2555" y="610"/>
        <di:waypoint x="2620" y="610"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_10_step_11" bpmnElement="Flow_step_10_step_11">
        <di:waypoint x="2790" y="610"/>
        <di:waypoint x="2815" y="610"/>
        <di:waypoint x="2815" y="1270"/>
        <di:waypoint x="2880" y="1270"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Edge_Flow_step_11_end_ready" bpmnElement="Flow_step_11_end_ready">
        <di:waypoint x="3050" y="1270"/>
        <di:waypoint x="3140" y="1270"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
