<?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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:color="http://www.omg.org/spec/BPMN/non-normative/color/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_16l7d92" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.25.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.21.0">
  <bpmn:process id="approvement_test_1" name="approvement-test" isExecutable="true" camunda:historyTimeToLive="100">
    <bpmn:startEvent id="StartEvent_1">
      <bpmn:outgoing>Flow_1ai9etl</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="Activity_1bne0zs" name="Согласование руководителем" camunda:assignee="assavinc10">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="tags" value="approvement" />
          <camunda:property name="serviceKey" value="sd-adapter" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_15bt283</bpmn:incoming>
      <bpmn:outgoing>Flow_1e4gjlx</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_1ai9etl" sourceRef="StartEvent_1" targetRef="Activity_05wz618" />
    <bpmn:endEvent id="Event_0e1s3ol">
      <bpmn:incoming>Flow_1kfmx5m</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1e4gjlx" sourceRef="Activity_1bne0zs" targetRef="Activity_10de6ie" />
    <bpmn:userTask id="Activity_10de6ie" name="Согласование HR" camunda:assignee="sa0000jocasta">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="tags" value="approvement" />
          <camunda:property name="serviceKey" value="sd-adapter" />
        </camunda:properties>
        <camunda:inputOutput>
          <camunda:outputParameter name="lastDecision">${comment}</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1e4gjlx</bpmn:incoming>
      <bpmn:outgoing>Flow_1yxc8vk</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_1yxc8vk" sourceRef="Activity_10de6ie" targetRef="Activity_0i59amn" />
    <bpmn:serviceTask id="Activity_0i59amn" name="Смена статуса на &#34;Завершено&#34;" camunda:asyncAfter="true">
      <bpmn:extensionElements>
        <camunda:inputOutput>
          <camunda:inputParameter name="type">save</camunda:inputParameter>
          <camunda:inputParameter name="statusDescription">Заявка завершена</camunda:inputParameter>
          <camunda:inputParameter name="statusID">solved</camunda:inputParameter>
          <camunda:inputParameter name="statusComment">${lastDecision}</camunda:inputParameter>
        </camunda:inputOutput>
        <camunda:connector>
          <camunda:inputOutput>
            <camunda:inputParameter name="signalKey">update_status</camunda:inputParameter>
            <camunda:inputParameter name="serviceKey">sd-adapter</camunda:inputParameter>
          </camunda:inputOutput>
          <camunda:connectorId>kafka-connector</camunda:connectorId>
        </camunda:connector>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1yxc8vk</bpmn:incoming>
      <bpmn:outgoing>Flow_1kfmx5m</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sequenceFlow id="Flow_1kfmx5m" sourceRef="Activity_0i59amn" targetRef="Event_0e1s3ol" />
    <bpmn:userTask id="Activity_05wz618" name="Согласование группой" camunda:candidateUsers="approvers" camunda:candidateGroups="6d78cf93-a9f6-4b51-95ed-c85ecbb1dc40">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="tags" value="approvement" />
          <camunda:property name="serviceKey" value="sd-adapter" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1ai9etl</bpmn:incoming>
      <bpmn:outgoing>Flow_15bt283</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_15bt283" sourceRef="Activity_05wz618" targetRef="Activity_1bne0zs" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="approvement_test_1">
      <bpmndi:BPMNShape id="Event_0e1s3ol_di" bpmnElement="Event_0e1s3ol">
        <dc:Bounds x="882" y="99" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_10in7yl" bpmnElement="Activity_0i59amn" bioc:stroke="#0d4372" bioc:fill="#bbdefb" color:background-color="#bbdefb" color:border-color="#0d4372">
        <dc:Bounds x="720" y="77" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1bne0zs_di" bpmnElement="Activity_1bne0zs">
        <dc:Bounds x="400" y="77" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_05m0nz6" bpmnElement="Activity_10de6ie">
        <dc:Bounds x="560" y="77" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="152" y="99" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_10f3ez1" bpmnElement="Activity_05wz618">
        <dc:Bounds x="240" y="77" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1ai9etl_di" bpmnElement="Flow_1ai9etl">
        <di:waypoint x="188" y="117" />
        <di:waypoint x="240" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1e4gjlx_di" bpmnElement="Flow_1e4gjlx">
        <di:waypoint x="500" y="117" />
        <di:waypoint x="560" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1yxc8vk_di" bpmnElement="Flow_1yxc8vk">
        <di:waypoint x="660" y="117" />
        <di:waypoint x="720" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1kfmx5m_di" bpmnElement="Flow_1kfmx5m">
        <di:waypoint x="820" y="117" />
        <di:waypoint x="882" y="117" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_15bt283_di" bpmnElement="Flow_15bt283">
        <di:waypoint x="340" y="117" />
        <di:waypoint x="400" y="117" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
