Назначение: Сценарий процесса. Продукт: ShariX Open.
Для кого: Разработчик · Администратор · Поддержка · Рецензент и приёмщик · Нейросеть.
Темы: Обработчики → ACCESS_REQUEST · Доступ → Полномочия · Доступ → Требования.
Область: ShariX Open. Обработчик: open_access_request_accepted, тип ACCESS_REQUEST (3), рабочий статус ACCEPTED (321).
Описание относится к опубликованным исходникам. Выбранная версия и состояние конкретной установки проверяются отдельно.
Загрузка схемы…
<?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_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" targetNamespace="urn:sharix:knowledge:processes">
<bpmn:process id="Process_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" name="ACCESS_REQUEST в ACCEPTED: требования и активация права" isExecutable="false">
<bpmn:documentation>{"notes": ["Схема сверена с предметным описанием и актуальными опубликованными источниками; не является исполняемым workflow."], "sources": [{"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "handlers/open_access_request_accepted.py", "repository": "sharix-open-handlers-examples", "sha256": "5cbb0d1daf3e18ba9b4e20ea981f1d40c61f081f42e911506dd8cce8281f2ee0"}, {"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "generated_handler_blocks/open_access_request_accepted.json", "repository": "sharix-open-handlers-examples", "sha256": "1e9f133ff0c3bc7c4b8f3d7926d83c1283d4ce673c09bc594f7b0bf3671a8d29"}, {"commit": "dc3f19fe133828698370477f124b79e6c0239a64", "path": "core/blockly_runtime.py", "repository": "sharix-open-handlers-backend", "sha256": "640e3fe1eaedba273e3cb880553000848c848b8754f740293b0ab80d743ac59e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/assignment.py", "repository": "sharix-open-tickets", "sha256": "2024a49e46668411d3d49ced29041c6d22db7c73f7e4e4757fab4d04bc13876e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/handler_wakeup.py", "repository": "sharix-open-tickets", "sha256": "c9fdc62a18301fd7c075395c697d5b1c738c77713aa71fcbb5ab097e173d98de"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "models/ticket.py", "repository": "sharix-open-tickets", "sha256": "1a4294d422fe38dd5a5ac055554e232ef60538c82ce77dcae2a13cb5298a09e8"}]}</bpmn:documentation>
<bpmn:laneSet id="Lanes_ShariXKnowledgeAccessRequestAcceptedBPMN_manual">
<bpmn:lane id="Lane_workflow" name="Обработчик и scoped API: последовательность операций">
<bpmn:flowNodeRef>start</bpmn:flowNodeRef>
<bpmn:flowNodeRef>rights</bpmn:flowNodeRef>
<bpmn:flowNodeRef>assigned</bpmn:flowNodeRef>
<bpmn:flowNodeRef>keep</bpmn:flowNodeRef>
<bpmn:flowNodeRef>actor</bpmn:flowNodeRef>
<bpmn:flowNodeRef>save</bpmn:flowNodeRef>
<bpmn:flowNodeRef>event</bpmn:flowNodeRef>
<bpmn:flowNodeRef>end</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="start" name="Человек выбирает ACCEPTED / DECLINED">
<bpmn:outgoing>Flow_0</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:serviceTask id="rights" name="Backend: права, lifecycle, блокировка Ticket">
<bpmn:incoming>Flow_0</bpmn:incoming>
<bpmn:outgoing>Flow_1</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="assigned" name="Ответственный уже есть?">
<bpmn:incoming>Flow_1</bpmn:incoming>
<bpmn:outgoing>Flow_2</bpmn:outgoing>
<bpmn:outgoing>Flow_3</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="keep" name="Сохранить прежнего ответственного">
<bpmn:incoming>Flow_2</bpmn:incoming>
<bpmn:outgoing>Flow_4</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="actor" name="Для свободной: явный ответственный или actor">
<bpmn:incoming>Flow_3</bpmn:incoming>
<bpmn:outgoing>Flow_5</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="save" name="Сохранить статус, assignee и Event">
<bpmn:incoming>Flow_4</bpmn:incoming>
<bpmn:incoming>Flow_5</bpmn:incoming>
<bpmn:outgoing>Flow_6</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:intermediateCatchEvent id="event" name="После commit: смена владельца">
<bpmn:incoming>Flow_6</bpmn:incoming>
<bpmn:outgoing>Flow_7</bpmn:outgoing>
<bpmn:messageEventDefinition />
</bpmn:intermediateCatchEvent>
<bpmn:endEvent id="end" name="Профильный handler продолжает">
<bpmn:incoming>Flow_7</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_0" sourceRef="start" targetRef="rights" name="" />
<bpmn:sequenceFlow id="Flow_1" sourceRef="rights" targetRef="assigned" name="" />
<bpmn:sequenceFlow id="Flow_2" sourceRef="assigned" targetRef="keep" name="Да" />
<bpmn:sequenceFlow id="Flow_3" sourceRef="assigned" targetRef="actor" name="Нет" />
<bpmn:sequenceFlow id="Flow_4" sourceRef="keep" targetRef="save" name="" />
<bpmn:sequenceFlow id="Flow_5" sourceRef="actor" targetRef="save" name="" />
<bpmn:sequenceFlow id="Flow_6" sourceRef="save" targetRef="event" name="" />
<bpmn:sequenceFlow id="Flow_7" sourceRef="event" targetRef="end" name="" />
</bpmn:process>
<bpmn:collaboration id="Collaboration_ShariXKnowledgeAccessRequestAcceptedBPMN_manual">
<bpmn:participant id="Pool_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" name="ACCESS_REQUEST в ACCEPTED: требования и активация права" processRef="Process_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" />
</bpmn:collaboration>
<bpmndi:BPMNDiagram id="Diagram_ShariXKnowledgeAccessRequestAcceptedBPMN_manual">
<bpmndi:BPMNPlane id="Plane_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" bpmnElement="Collaboration_ShariXKnowledgeAccessRequestAcceptedBPMN_manual">
<bpmndi:BPMNShape id="DI_Pool_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" bpmnElement="Pool_ShariXKnowledgeAccessRequestAcceptedBPMN_manual" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1670" height="360" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_Lane_workflow" bpmnElement="Lane_workflow" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1640" height="360" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_start" bpmnElement="start">
<dc:Bounds x="152.0" y="82.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_rights" bpmnElement="rights">
<dc:Bounds x="315.0" y="65.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_assigned" bpmnElement="assigned">
<dc:Bounds x="595.0" y="75.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_keep" bpmnElement="keep">
<dc:Bounds x="775.0" y="65.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_actor" bpmnElement="actor">
<dc:Bounds x="775.0" y="225.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_save" bpmnElement="save">
<dc:Bounds x="1015.0" y="145.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_event" bpmnElement="event">
<dc:Bounds x="1292.0" y="162.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DI_end" bpmnElement="end">
<dc:Bounds x="1492.0" y="162.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="DI_Flow_0" bpmnElement="Flow_0">
<di:waypoint x="188.0" y="100.0" />
<di:waypoint x="315.0" y="100.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_1" bpmnElement="Flow_1">
<di:waypoint x="465.0" y="100.0" />
<di:waypoint x="595.0" y="100.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_2" bpmnElement="Flow_2">
<di:waypoint x="645.0" y="100.0" />
<di:waypoint x="775.0" y="100.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_3" bpmnElement="Flow_3">
<di:waypoint x="645.0" y="100.0" />
<di:waypoint x="710.0" y="100.0" />
<di:waypoint x="710.0" y="260.0" />
<di:waypoint x="775.0" y="260.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_4" bpmnElement="Flow_4">
<di:waypoint x="925.0" y="100.0" />
<di:waypoint x="970.0" y="100.0" />
<di:waypoint x="970.0" y="180.0" />
<di:waypoint x="1015.0" y="180.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_5" bpmnElement="Flow_5">
<di:waypoint x="925.0" y="260.0" />
<di:waypoint x="970.0" y="260.0" />
<di:waypoint x="970.0" y="180.0" />
<di:waypoint x="1015.0" y="180.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_6" bpmnElement="Flow_6">
<di:waypoint x="1165.0" y="180.0" />
<di:waypoint x="1292.0" y="180.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Flow_7" bpmnElement="Flow_7">
<di:waypoint x="1328.0" y="180.0" />
<di:waypoint x="1492.0" y="180.0" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
Когда аутентифицированный человек действительно меняет статус на ACCEPTED или DECLINED, backend под блокировкой сохраняет ответственность:
Правило применяется в общей записи Ticket, в том числе для разрешённых действий Django-admin. Изменение от источника handler: не назначает bot ответственным. Назначение не обходит lifecycle, объектные права, требования активации или проверку связей. After-commit событие будит профильного обработчика; неизвестный результат запроса сначала сверяют чтением Ticket и аудита.
ACCEPTED означает одобренный запрос. Для active permission ещё требуются:
Отсутствующая permission этим handler не создаётся. ACCREQ_AUTOACCEPT здесь не проверяется: требования действуют независимо от способа принятия PENDING.
Порядок runtime:
Общей транзакции этих запросов нет. Предварительный ok не позволяет пропустить повторную оценку внутри активации.
BPMN имеют isExecutable=false. Wiki не запускает код: runtime выполняет выбранный проверенный Python из Blockly. End event завершает показанную операцию; defer-узел на первой схеме завершает текущий проход и передаёт ожидание планировщику.
Загрузка схемы…
<?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_access_accepted_decisions" targetNamespace="urn:sharix:knowledge:handlers">
<bpmn:process id="accepted_Process_accepted" name="open_access_request_accepted: проверить требования, активировать permission, закрыть Ticket" isExecutable="false">
<bpmn:documentation>{"notes": ["Схема сверена с предметным описанием и актуальными опубликованными источниками; не является исполняемым workflow."], "sources": [{"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "handlers/open_access_request_accepted.py", "repository": "sharix-open-handlers-examples", "sha256": "5cbb0d1daf3e18ba9b4e20ea981f1d40c61f081f42e911506dd8cce8281f2ee0"}, {"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "generated_handler_blocks/open_access_request_accepted.json", "repository": "sharix-open-handlers-examples", "sha256": "1e9f133ff0c3bc7c4b8f3d7926d83c1283d4ce673c09bc594f7b0bf3671a8d29"}, {"commit": "dc3f19fe133828698370477f124b79e6c0239a64", "path": "core/blockly_runtime.py", "repository": "sharix-open-handlers-backend", "sha256": "640e3fe1eaedba273e3cb880553000848c848b8754f740293b0ab80d743ac59e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/assignment.py", "repository": "sharix-open-tickets", "sha256": "2024a49e46668411d3d49ced29041c6d22db7c73f7e4e4757fab4d04bc13876e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/handler_wakeup.py", "repository": "sharix-open-tickets", "sha256": "c9fdc62a18301fd7c075395c697d5b1c738c77713aa71fcbb5ab097e173d98de"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "models/ticket.py", "repository": "sharix-open-tickets", "sha256": "1a4294d422fe38dd5a5ac055554e232ef60538c82ce77dcae2a13cb5298a09e8"}]}</bpmn:documentation>
<bpmn:laneSet id="accepted_Lanes_accepted">
<bpmn:lane id="accepted_Lane_worker" name="Один проход Python: ожидание означает возврат Ticket с defer">
<bpmn:flowNodeRef>accepted_start</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_status</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_lookup</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_exists</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_requirements</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_met</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_activate</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_active</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_close</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_confirmed</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_remove</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_done</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_stale</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_stale_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_missing</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_missing_wait</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_need</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_need_wait</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_inconsistent</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_activation_wait</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_not_found</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_lookup_error</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_requirements_error</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_activate_error</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_close_error</bpmn:flowNodeRef>
<bpmn:flowNodeRef>accepted_retry</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="accepted_start" name="Ticket готов к проходу">
<bpmn:outgoing>accepted_Flow_0</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:exclusiveGateway id="accepted_status" name="Статус ACCEPTED?">
<bpmn:incoming>accepted_Flow_0</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_1</bpmn:outgoing>
<bpmn:outgoing>accepted_Flow_2</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="accepted_lookup" name="Scoped API: найти permission">
<bpmn:incoming>accepted_Flow_1</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_4</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="accepted_exists" name="Permission найдена?">
<bpmn:incoming>accepted_Flow_4</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_5</bpmn:outgoing>
<bpmn:outgoing>accepted_Flow_6</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="accepted_requirements" name="API: ensure actions + проверить requirements">
<bpmn:incoming>accepted_Flow_5</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_8</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="accepted_met" name="Все требования ok?">
<bpmn:incoming>accepted_Flow_8</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_9</bpmn:outgoing>
<bpmn:outgoing>accepted_Flow_10</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="accepted_activate" name="API: активировать permission с повторным gate">
<bpmn:incoming>accepted_Flow_9</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_12</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="accepted_active" name="Активация подтверждена?">
<bpmn:incoming>accepted_Flow_12</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_13</bpmn:outgoing>
<bpmn:outgoing>accepted_Flow_14</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="accepted_close" name="Scoped Ticket API: CLOSED">
<bpmn:incoming>accepted_Flow_13</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_16</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="accepted_confirmed" name="Переход подтверждён?">
<bpmn:incoming>accepted_Flow_16</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_17</bpmn:outgoing>
<bpmn:outgoing>accepted_Flow_18</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="accepted_remove" name="Убрать Ticket и комнату">
<bpmn:incoming>accepted_Flow_17</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_19</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:endEvent id="accepted_done" name="Этот проход завершён">
<bpmn:incoming>accepted_Flow_19</bpmn:incoming>
</bpmn:endEvent>
<bpmn:serviceTask id="accepted_stale" name="Убрать Ticket и комнату">
<bpmn:incoming>accepted_Flow_2</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:endEvent id="accepted_stale_end" name="Прежний владелец освобождён">
<bpmn:incoming>accepted_Flow_3</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sendTask id="accepted_missing" name="ALERT администраторам: permission не найдена">
<bpmn:incoming>accepted_Flow_6</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_7</bpmn:outgoing>
</bpmn:sendTask>
<bpmn:serviceTask id="accepted_missing_wait" name="related_permission_missing; defer">
<bpmn:documentation>ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS</bpmn:documentation>
<bpmn:incoming>accepted_Flow_7</bpmn:incoming>
</bpmn:serviceTask>
<bpmn:sendTask id="accepted_need" name="Уведомить автора и администраторов о требованиях">
<bpmn:incoming>accepted_Flow_10</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_11</bpmn:outgoing>
</bpmn:sendTask>
<bpmn:serviceTask id="accepted_need_wait" name="requirements_pending; defer">
<bpmn:documentation>ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS</bpmn:documentation>
<bpmn:incoming>accepted_Flow_11</bpmn:incoming>
</bpmn:serviceTask>
<bpmn:sendTask id="accepted_inconsistent" name="ALERT: активация не подтверждена">
<bpmn:incoming>accepted_Flow_14</bpmn:incoming>
<bpmn:outgoing>accepted_Flow_15</bpmn:outgoing>
</bpmn:sendTask>
<bpmn:serviceTask id="accepted_activation_wait" name="related_permission_inconsistent; ''ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS'' с">
<bpmn:incoming>accepted_Flow_15</bpmn:incoming>
</bpmn:serviceTask>
<bpmn:endEvent id="accepted_not_found" name="404: очистка уже запрошена">
<bpmn:incoming>accepted_Flow_18</bpmn:incoming>
</bpmn:endEvent>
<bpmn:boundaryEvent id="accepted_lookup_error" name="Ошибка read API" attachedToRef="accepted_lookup" cancelActivity="true">
<bpmn:outgoing>accepted_Flow_20</bpmn:outgoing>
<bpmn:errorEventDefinition />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="accepted_requirements_error" name="Ошибка requirements API" attachedToRef="accepted_requirements" cancelActivity="true">
<bpmn:outgoing>accepted_Flow_21</bpmn:outgoing>
<bpmn:errorEventDefinition />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="accepted_activate_error" name="401/403/429/5xx" attachedToRef="accepted_activate" cancelActivity="true">
<bpmn:outgoing>accepted_Flow_22</bpmn:outgoing>
<bpmn:errorEventDefinition />
</bpmn:boundaryEvent>
<bpmn:boundaryEvent id="accepted_close_error" name="Ошибка перехода" attachedToRef="accepted_close" cancelActivity="true">
<bpmn:outgoing>accepted_Flow_23</bpmn:outgoing>
<bpmn:errorEventDefinition />
</bpmn:boundaryEvent>
<bpmn:serviceTask id="accepted_retry" name="Общий processing_error + defer">
<bpmn:documentation>DEFERRED_TICKET_RECHECK_SECONDS. Ошибки уведомлений также попадают сюда.</bpmn:documentation>
<bpmn:incoming>accepted_Flow_20</bpmn:incoming>
<bpmn:incoming>accepted_Flow_21</bpmn:incoming>
<bpmn:incoming>accepted_Flow_22</bpmn:incoming>
<bpmn:incoming>accepted_Flow_23</bpmn:incoming>
</bpmn:serviceTask>
<bpmn:sequenceFlow id="accepted_Flow_0" sourceRef="accepted_start" targetRef="accepted_status" name="" />
<bpmn:sequenceFlow id="accepted_Flow_1" sourceRef="accepted_status" targetRef="accepted_lookup" name="Да" />
<bpmn:sequenceFlow id="accepted_Flow_2" sourceRef="accepted_status" targetRef="accepted_stale" name="Нет" />
<bpmn:sequenceFlow id="accepted_Flow_3" sourceRef="accepted_stale" targetRef="accepted_stale_end" name="" />
<bpmn:sequenceFlow id="accepted_Flow_4" sourceRef="accepted_lookup" targetRef="accepted_exists" name="" />
<bpmn:sequenceFlow id="accepted_Flow_5" sourceRef="accepted_exists" targetRef="accepted_requirements" name="Да" />
<bpmn:sequenceFlow id="accepted_Flow_6" sourceRef="accepted_exists" targetRef="accepted_missing" name="Нет" />
<bpmn:sequenceFlow id="accepted_Flow_7" sourceRef="accepted_missing" targetRef="accepted_missing_wait" name="" />
<bpmn:sequenceFlow id="accepted_Flow_8" sourceRef="accepted_requirements" targetRef="accepted_met" name="" />
<bpmn:sequenceFlow id="accepted_Flow_9" sourceRef="accepted_met" targetRef="accepted_activate" name="Да" />
<bpmn:sequenceFlow id="accepted_Flow_10" sourceRef="accepted_met" targetRef="accepted_need" name="Нет" />
<bpmn:sequenceFlow id="accepted_Flow_11" sourceRef="accepted_need" targetRef="accepted_need_wait" name="" />
<bpmn:sequenceFlow id="accepted_Flow_12" sourceRef="accepted_activate" targetRef="accepted_active" name="" />
<bpmn:sequenceFlow id="accepted_Flow_13" sourceRef="accepted_active" targetRef="accepted_close" name="Да" />
<bpmn:sequenceFlow id="accepted_Flow_14" sourceRef="accepted_active" targetRef="accepted_inconsistent" name="Нет" />
<bpmn:sequenceFlow id="accepted_Flow_15" sourceRef="accepted_inconsistent" targetRef="accepted_activation_wait" name="" />
<bpmn:sequenceFlow id="accepted_Flow_16" sourceRef="accepted_close" targetRef="accepted_confirmed" name="" />
<bpmn:sequenceFlow id="accepted_Flow_17" sourceRef="accepted_confirmed" targetRef="accepted_remove" name="Да" />
<bpmn:sequenceFlow id="accepted_Flow_18" sourceRef="accepted_confirmed" targetRef="accepted_not_found" name="Нет (404)" />
<bpmn:sequenceFlow id="accepted_Flow_19" sourceRef="accepted_remove" targetRef="accepted_done" name="" />
<bpmn:sequenceFlow id="accepted_Flow_20" sourceRef="accepted_lookup_error" targetRef="accepted_retry" name="" />
<bpmn:sequenceFlow id="accepted_Flow_21" sourceRef="accepted_requirements_error" targetRef="accepted_retry" name="" />
<bpmn:sequenceFlow id="accepted_Flow_22" sourceRef="accepted_activate_error" targetRef="accepted_retry" name="" />
<bpmn:sequenceFlow id="accepted_Flow_23" sourceRef="accepted_close_error" targetRef="accepted_retry" name="" />
</bpmn:process>
<bpmn:collaboration id="Collaboration_access_accepted_decisions">
<bpmn:participant id="accepted_Pool_accepted" name="open_access_request_accepted: проверить требования, активировать permission, закрыть Ticket" processRef="accepted_Process_accepted" />
</bpmn:collaboration>
<bpmndi:BPMNDiagram id="Diagram_access_accepted_decisions">
<bpmndi:BPMNPlane id="Plane_access_accepted_decisions" bpmnElement="Collaboration_access_accepted_decisions">
<bpmndi:BPMNShape id="accepted_DI_Pool_accepted" bpmnElement="accepted_Pool_accepted" isHorizontal="true">
<dc:Bounds x="0.0" y="0.0" width="2980" height="610" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_Lane_worker" bpmnElement="accepted_Lane_worker" isHorizontal="true">
<dc:Bounds x="30.0" y="0.0" width="2950" height="610" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_start" bpmnElement="accepted_start">
<dc:Bounds x="132.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_status" bpmnElement="accepted_status">
<dc:Bounds x="325.0" y="85.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_lookup" bpmnElement="accepted_lookup">
<dc:Bounds x="515.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_exists" bpmnElement="accepted_exists">
<dc:Bounds x="815.0" y="85.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_requirements" bpmnElement="accepted_requirements">
<dc:Bounds x="1015.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_met" bpmnElement="accepted_met">
<dc:Bounds x="1315.0" y="85.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_activate" bpmnElement="accepted_activate">
<dc:Bounds x="1515.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_active" bpmnElement="accepted_active">
<dc:Bounds x="1815.0" y="85.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_close" bpmnElement="accepted_close">
<dc:Bounds x="2015.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_confirmed" bpmnElement="accepted_confirmed">
<dc:Bounds x="2315.0" y="85.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_remove" bpmnElement="accepted_remove">
<dc:Bounds x="2515.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_done" bpmnElement="accepted_done">
<dc:Bounds x="2802.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_stale" bpmnElement="accepted_stale">
<dc:Bounds x="275.0" y="275.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_stale_end" bpmnElement="accepted_stale_end">
<dc:Bounds x="572.0" y="292.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_missing" bpmnElement="accepted_missing">
<dc:Bounds x="765.0" y="275.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_missing_wait" bpmnElement="accepted_missing_wait">
<dc:Bounds x="765.0" y="475.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_need" bpmnElement="accepted_need">
<dc:Bounds x="1265.0" y="275.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_need_wait" bpmnElement="accepted_need_wait">
<dc:Bounds x="1265.0" y="475.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_inconsistent" bpmnElement="accepted_inconsistent">
<dc:Bounds x="1765.0" y="275.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_activation_wait" bpmnElement="accepted_activation_wait">
<dc:Bounds x="1765.0" y="475.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_not_found" bpmnElement="accepted_not_found">
<dc:Bounds x="2322.0" y="292.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_lookup_error" bpmnElement="accepted_lookup_error">
<dc:Bounds x="622.0" y="127.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_requirements_error" bpmnElement="accepted_requirements_error">
<dc:Bounds x="1122.0" y="127.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_activate_error" bpmnElement="accepted_activate_error">
<dc:Bounds x="1622.0" y="127.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_close_error" bpmnElement="accepted_close_error">
<dc:Bounds x="2122.0" y="127.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="accepted_DI_retry" bpmnElement="accepted_retry">
<dc:Bounds x="2515.0" y="475.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="accepted_DI_Flow_0" bpmnElement="accepted_Flow_0">
<di:waypoint x="168.0" y="110.0" />
<di:waypoint x="325.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_1" bpmnElement="accepted_Flow_1">
<di:waypoint x="375.0" y="110.0" />
<di:waypoint x="515.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_2" bpmnElement="accepted_Flow_2">
<di:waypoint x="350.0" y="135.0" />
<di:waypoint x="350.0" y="275.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_3" bpmnElement="accepted_Flow_3">
<di:waypoint x="425.0" y="310.0" />
<di:waypoint x="572.0" y="310.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_4" bpmnElement="accepted_Flow_4">
<di:waypoint x="665.0" y="110.0" />
<di:waypoint x="815.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_5" bpmnElement="accepted_Flow_5">
<di:waypoint x="865.0" y="110.0" />
<di:waypoint x="1015.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_6" bpmnElement="accepted_Flow_6">
<di:waypoint x="840.0" y="135.0" />
<di:waypoint x="840.0" y="275.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_7" bpmnElement="accepted_Flow_7">
<di:waypoint x="840.0" y="345.0" />
<di:waypoint x="840.0" y="475.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_8" bpmnElement="accepted_Flow_8">
<di:waypoint x="1165.0" y="110.0" />
<di:waypoint x="1315.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_9" bpmnElement="accepted_Flow_9">
<di:waypoint x="1365.0" y="110.0" />
<di:waypoint x="1515.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_10" bpmnElement="accepted_Flow_10">
<di:waypoint x="1340.0" y="135.0" />
<di:waypoint x="1340.0" y="275.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_11" bpmnElement="accepted_Flow_11">
<di:waypoint x="1340.0" y="345.0" />
<di:waypoint x="1340.0" y="475.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_12" bpmnElement="accepted_Flow_12">
<di:waypoint x="1665.0" y="110.0" />
<di:waypoint x="1815.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_13" bpmnElement="accepted_Flow_13">
<di:waypoint x="1865.0" y="110.0" />
<di:waypoint x="2015.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_14" bpmnElement="accepted_Flow_14">
<di:waypoint x="1840.0" y="135.0" />
<di:waypoint x="1840.0" y="275.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_15" bpmnElement="accepted_Flow_15">
<di:waypoint x="1840.0" y="345.0" />
<di:waypoint x="1840.0" y="475.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_16" bpmnElement="accepted_Flow_16">
<di:waypoint x="2165.0" y="110.0" />
<di:waypoint x="2315.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_17" bpmnElement="accepted_Flow_17">
<di:waypoint x="2365.0" y="110.0" />
<di:waypoint x="2515.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_18" bpmnElement="accepted_Flow_18">
<di:waypoint x="2340.0" y="135.0" />
<di:waypoint x="2340.0" y="292.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_19" bpmnElement="accepted_Flow_19">
<di:waypoint x="2665.0" y="110.0" />
<di:waypoint x="2802.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_20" bpmnElement="accepted_Flow_20">
<di:waypoint x="658.0" y="145.0" />
<di:waypoint x="700.0" y="145.0" />
<di:waypoint x="700.0" y="590.0" />
<di:waypoint x="2590.0" y="590.0" />
<di:waypoint x="2590.0" y="475.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_21" bpmnElement="accepted_Flow_21">
<di:waypoint x="1158.0" y="145.0" />
<di:waypoint x="1200.0" y="145.0" />
<di:waypoint x="1200.0" y="570.0" />
<di:waypoint x="2590.0" y="570.0" />
<di:waypoint x="2590.0" y="475.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_22" bpmnElement="accepted_Flow_22">
<di:waypoint x="1658.0" y="145.0" />
<di:waypoint x="1700.0" y="145.0" />
<di:waypoint x="1700.0" y="550.0" />
<di:waypoint x="2590.0" y="550.0" />
<di:waypoint x="2590.0" y="475.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="accepted_DI_Flow_23" bpmnElement="accepted_Flow_23">
<di:waypoint x="2158.0" y="145.0" />
<di:waypoint x="2200.0" y="145.0" />
<di:waypoint x="2590.0" y="145.0" />
<di:waypoint x="2590.0" y="475.0" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>related_permission_missing, ждать по ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS. Отсутствующую permission этот handler не создаёт.requirements_pending и назначить тот же именованный повтор. Ticket остаётся в ACCEPTED.CLOSED; после подтверждённого перехода убрать локальный Ticket и комнату.related_permission_inconsistent и отложить на ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS; значение берётся из окружения при запуске.Связь ищется по ticket_status_id с чтением максимум двух записей:
По одному 404 нельзя доказать физическое отсутствие permission. Сначала сверить актуальный Ticket и его рабочую область.
Загрузка схемы…
<?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_access_accepted_gate" targetNamespace="urn:sharix:knowledge:handlers">
<bpmn:process id="gate_Process_gate" name="Backend: два последовательных scoped запроса с разными задачами" isExecutable="false">
<bpmn:documentation>{"notes": ["Схема сверена с предметным описанием и актуальными опубликованными источниками; не является исполняемым workflow."], "sources": [{"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "handlers/open_access_request_accepted.py", "repository": "sharix-open-handlers-examples", "sha256": "5cbb0d1daf3e18ba9b4e20ea981f1d40c61f081f42e911506dd8cce8281f2ee0"}, {"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "generated_handler_blocks/open_access_request_accepted.json", "repository": "sharix-open-handlers-examples", "sha256": "1e9f133ff0c3bc7c4b8f3d7926d83c1283d4ce673c09bc594f7b0bf3671a8d29"}, {"commit": "dc3f19fe133828698370477f124b79e6c0239a64", "path": "core/blockly_runtime.py", "repository": "sharix-open-handlers-backend", "sha256": "640e3fe1eaedba273e3cb880553000848c848b8754f740293b0ab80d743ac59e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/assignment.py", "repository": "sharix-open-tickets", "sha256": "2024a49e46668411d3d49ced29041c6d22db7c73f7e4e4757fab4d04bc13876e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/handler_wakeup.py", "repository": "sharix-open-tickets", "sha256": "c9fdc62a18301fd7c075395c697d5b1c738c77713aa71fcbb5ab097e173d98de"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "models/ticket.py", "repository": "sharix-open-tickets", "sha256": "1a4294d422fe38dd5a5ac055554e232ef60538c82ce77dcae2a13cb5298a09e8"}]}</bpmn:documentation>
<bpmn:laneSet id="gate_Lanes_gate">
<bpmn:lane id="gate_Lane_read" name="GET requirements: подготовка действий и оценка">
<bpmn:flowNodeRef>gate_start</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_scope</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_ensure</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_evaluate</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_response</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="gate_Lane_activate" name="POST permission set_status=0: каноническая активация">
<bpmn:flowNodeRef>gate_request</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_lock</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_gate</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_ok</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_save</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_event</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>gate_deny</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="gate_start" name="GET requirements?model=permission">
<bpmn:outgoing>gate_Flow_0</bpmn:outgoing>
<bpmn:messageEventDefinition />
</bpmn:startEvent>
<bpmn:serviceTask id="gate_scope" name="Identity, capability, Ticket scope">
<bpmn:incoming>gate_Flow_0</bpmn:incoming>
<bpmn:outgoing>gate_Flow_1</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="gate_ensure" name="Создать / переиспользовать недостающие действия">
<bpmn:documentation>Обязательные черновики документов и попытки проверок, связанные ST_REQUEST при наличии настроенной очереди.</bpmn:documentation>
<bpmn:incoming>gate_Flow_1</bpmn:incoming>
<bpmn:outgoing>gate_Flow_2</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="gate_evaluate" name="Read-only evaluate_requirements">
<bpmn:incoming>gate_Flow_2</bpmn:incoming>
<bpmn:outgoing>gate_Flow_3</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:endEvent id="gate_response" name="ok, required, present, missing, details">
<bpmn:incoming>gate_Flow_3</bpmn:incoming>
</bpmn:endEvent>
<bpmn:startEvent id="gate_request" name="POST permission set_status=0">
<bpmn:outgoing>gate_Flow_4</bpmn:outgoing>
<bpmn:messageEventDefinition />
</bpmn:startEvent>
<bpmn:serviceTask id="gate_lock" name="Scope и блокировки Ticket / permission">
<bpmn:incoming>gate_Flow_4</bpmn:incoming>
<bpmn:outgoing>gate_Flow_5</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="gate_gate" name="ensure actions + повторная оценка требований">
<bpmn:incoming>gate_Flow_5</bpmn:incoming>
<bpmn:outgoing>gate_Flow_6</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="gate_ok" name="Все обязательные требования ok?">
<bpmn:incoming>gate_Flow_6</bpmn:incoming>
<bpmn:outgoing>gate_Flow_7</bpmn:outgoing>
<bpmn:outgoing>gate_Flow_8</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:serviceTask id="gate_save" name="Сохранить permission active и audit-поля">
<bpmn:documentation>status=0, check_date; checked_by из assigned_to при наличии. Для METASERVICE-CLIENT/CORP-CLIENT синхронизировать соответствующую доменную запись.</bpmn:documentation>
<bpmn:incoming>gate_Flow_7</bpmn:incoming>
<bpmn:outgoing>gate_Flow_9</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="gate_event" name="Записать Event, вернуть успешный ответ">
<bpmn:incoming>gate_Flow_9</bpmn:incoming>
<bpmn:outgoing>gate_Flow_10</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:endEvent id="gate_end" name="Активация зафиксирована">
<bpmn:incoming>gate_Flow_10</bpmn:incoming>
</bpmn:endEvent>
<bpmn:endEvent id="gate_deny" name="Ошибка: активация не разрешена">
<bpmn:incoming>gate_Flow_8</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="gate_Flow_0" sourceRef="gate_start" targetRef="gate_scope" name="" />
<bpmn:sequenceFlow id="gate_Flow_1" sourceRef="gate_scope" targetRef="gate_ensure" name="" />
<bpmn:sequenceFlow id="gate_Flow_2" sourceRef="gate_ensure" targetRef="gate_evaluate" name="" />
<bpmn:sequenceFlow id="gate_Flow_3" sourceRef="gate_evaluate" targetRef="gate_response" name="" />
<bpmn:sequenceFlow id="gate_Flow_4" sourceRef="gate_request" targetRef="gate_lock" name="" />
<bpmn:sequenceFlow id="gate_Flow_5" sourceRef="gate_lock" targetRef="gate_gate" name="" />
<bpmn:sequenceFlow id="gate_Flow_6" sourceRef="gate_gate" targetRef="gate_ok" name="" />
<bpmn:sequenceFlow id="gate_Flow_7" sourceRef="gate_ok" targetRef="gate_save" name="Да" />
<bpmn:sequenceFlow id="gate_Flow_8" sourceRef="gate_ok" targetRef="gate_deny" name="Нет" />
<bpmn:sequenceFlow id="gate_Flow_9" sourceRef="gate_save" targetRef="gate_event" name="" />
<bpmn:sequenceFlow id="gate_Flow_10" sourceRef="gate_event" targetRef="gate_end" name="" />
</bpmn:process>
<bpmn:collaboration id="Collaboration_access_accepted_gate">
<bpmn:participant id="gate_Pool_gate" name="Backend: два последовательных scoped запроса с разными задачами" processRef="gate_Process_gate" />
</bpmn:collaboration>
<bpmndi:BPMNDiagram id="Diagram_access_accepted_gate">
<bpmndi:BPMNPlane id="Plane_access_accepted_gate" bpmnElement="Collaboration_access_accepted_gate">
<bpmndi:BPMNShape id="gate_DI_Pool_gate" bpmnElement="gate_Pool_gate" isHorizontal="true">
<dc:Bounds x="0.0" y="0.0" width="1960" height="700" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_Lane_read" bpmnElement="gate_Lane_read" isHorizontal="true">
<dc:Bounds x="30.0" y="0.0" width="1930" height="250.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_Lane_activate" bpmnElement="gate_Lane_activate" isHorizontal="true">
<dc:Bounds x="30.0" y="250.0" width="1930" height="450.0" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_start" bpmnElement="gate_start">
<dc:Bounds x="132.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_scope" bpmnElement="gate_scope">
<dc:Bounds x="345.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_ensure" bpmnElement="gate_ensure">
<dc:Bounds x="625.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_evaluate" bpmnElement="gate_evaluate">
<dc:Bounds x="905.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_response" bpmnElement="gate_response">
<dc:Bounds x="1242.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_request" bpmnElement="gate_request">
<dc:Bounds x="132.0" y="372.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_lock" bpmnElement="gate_lock">
<dc:Bounds x="345.0" y="355.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_gate" bpmnElement="gate_gate">
<dc:Bounds x="625.0" y="355.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_ok" bpmnElement="gate_ok">
<dc:Bounds x="955.0" y="365.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_save" bpmnElement="gate_save">
<dc:Bounds x="1185.0" y="355.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_event" bpmnElement="gate_event">
<dc:Bounds x="1465.0" y="355.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_end" bpmnElement="gate_end">
<dc:Bounds x="1782.0" y="372.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="gate_DI_deny" bpmnElement="gate_deny">
<dc:Bounds x="962.0" y="582.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="gate_DI_Flow_0" bpmnElement="gate_Flow_0">
<di:waypoint x="168.0" y="110.0" />
<di:waypoint x="345.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_1" bpmnElement="gate_Flow_1">
<di:waypoint x="495.0" y="110.0" />
<di:waypoint x="625.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_2" bpmnElement="gate_Flow_2">
<di:waypoint x="775.0" y="110.0" />
<di:waypoint x="905.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_3" bpmnElement="gate_Flow_3">
<di:waypoint x="1055.0" y="110.0" />
<di:waypoint x="1242.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_4" bpmnElement="gate_Flow_4">
<di:waypoint x="168.0" y="390.0" />
<di:waypoint x="345.0" y="390.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_5" bpmnElement="gate_Flow_5">
<di:waypoint x="495.0" y="390.0" />
<di:waypoint x="625.0" y="390.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_6" bpmnElement="gate_Flow_6">
<di:waypoint x="775.0" y="390.0" />
<di:waypoint x="955.0" y="390.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_7" bpmnElement="gate_Flow_7">
<di:waypoint x="1005.0" y="390.0" />
<di:waypoint x="1185.0" y="390.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_8" bpmnElement="gate_Flow_8">
<di:waypoint x="980.0" y="415.0" />
<di:waypoint x="980.0" y="582.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_9" bpmnElement="gate_Flow_9">
<di:waypoint x="1335.0" y="390.0" />
<di:waypoint x="1465.0" y="390.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="gate_DI_Flow_10" bpmnElement="gate_Flow_10">
<di:waypoint x="1615.0" y="390.0" />
<di:waypoint x="1782.0" y="390.0" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
GET dbsynce/api/handler/ticket/{ticket_id}/requirements/?model=permission требует capability related.requirements.read и текущий Ticket scope. В этой реализации GET не является чистым чтением: перед оценкой он вызывает ensure_requirement_actions. Канонический evaluator остаётся read-only, а orchestration подготавливает недостающие обязательные черновики документов, попытки RequirementCheck и связанные профильные ST_REQUEST там, где это предусмотрено настройками.
Подготовка действий соблюдает доменные правила:
Необязательный публичный порт может подготовить сведения о встрече. Это организация, а не положительный результат проверки.
После ok=true runtime запрашивает dbsynce/api/handler/ticket/{ticket_id}/permission/ с действием set_status и status=0. Backend проверяет capability related.permission.status, scope, единственность связи и блокирует строки Ticket/permission. Установка active через совместимый set_status проходит тот же activate_object_if_requirements_met, что и явная activate-операция: повторная подготовка действий и новая оценка обязательных требований. Прямой status=0 не является обходом gate.
Успешная активация сохраняет:
Для METASERVICE-CLIENT и CORP-CLIENT синхронизируются соответствующие Client/CorpClient с учётом связи Ticket. Источником права остаётся Permissions; доступ к интерфейсам определяется их ACL.
Загрузка схемы…
<?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_access_accepted_waiting" targetNamespace="urn:sharix:knowledge:handlers">
<bpmn:process id="queue_Process_queue" name="Ожидание требований и повторная проверка ACCEPTED" isExecutable="false">
<bpmn:documentation>{"notes": ["Схема сверена с предметным описанием и актуальными опубликованными источниками; не является исполняемым workflow."], "sources": [{"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "handlers/open_access_request_accepted.py", "repository": "sharix-open-handlers-examples", "sha256": "5cbb0d1daf3e18ba9b4e20ea981f1d40c61f081f42e911506dd8cce8281f2ee0"}, {"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "generated_handler_blocks/open_access_request_accepted.json", "repository": "sharix-open-handlers-examples", "sha256": "1e9f133ff0c3bc7c4b8f3d7926d83c1283d4ce673c09bc594f7b0bf3671a8d29"}, {"commit": "dc3f19fe133828698370477f124b79e6c0239a64", "path": "core/blockly_runtime.py", "repository": "sharix-open-handlers-backend", "sha256": "640e3fe1eaedba273e3cb880553000848c848b8754f740293b0ab80d743ac59e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/assignment.py", "repository": "sharix-open-tickets", "sha256": "2024a49e46668411d3d49ced29041c6d22db7c73f7e4e4757fab4d04bc13876e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/handler_wakeup.py", "repository": "sharix-open-tickets", "sha256": "c9fdc62a18301fd7c075395c697d5b1c738c77713aa71fcbb5ab097e173d98de"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "models/ticket.py", "repository": "sharix-open-tickets", "sha256": "1a4294d422fe38dd5a5ac055554e232ef60538c82ce77dcae2a13cb5298a09e8"}]}</bpmn:documentation>
<bpmn:laneSet id="queue_Lanes_queue">
<bpmn:lane id="queue_Lane_worker" name="Между проходами worker свободен">
<bpmn:flowNodeRef>queue_start</bpmn:flowNodeRef>
<bpmn:flowNodeRef>queue_wait</bpmn:flowNodeRef>
<bpmn:flowNodeRef>queue_timer</bpmn:flowNodeRef>
<bpmn:flowNodeRef>queue_revision</bpmn:flowNodeRef>
<bpmn:flowNodeRef>queue_ready</bpmn:flowNodeRef>
<bpmn:flowNodeRef>queue_again</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="queue_start" name="Назначен локальный defer">
<bpmn:outgoing>queue_Flow_0</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:eventBasedGateway id="queue_wait" name="Что наступило раньше?">
<bpmn:incoming>queue_Flow_0</bpmn:incoming>
<bpmn:outgoing>queue_Flow_1</bpmn:outgoing>
<bpmn:outgoing>queue_Flow_2</bpmn:outgoing>
</bpmn:eventBasedGateway>
<bpmn:intermediateCatchEvent id="queue_timer" name="Наступил deferred_until">
<bpmn:incoming>queue_Flow_1</bpmn:incoming>
<bpmn:outgoing>queue_Flow_3</bpmn:outgoing>
<bpmn:timerEventDefinition>
<bpmn:timeDate xsi:type="bpmn:tFormalExpression">deferred_until</bpmn:timeDate>
</bpmn:timerEventDefinition>
</bpmn:intermediateCatchEvent>
<bpmn:intermediateCatchEvent id="queue_revision" name="Получена новая ревизия Ticket">
<bpmn:incoming>queue_Flow_2</bpmn:incoming>
<bpmn:outgoing>queue_Flow_4</bpmn:outgoing>
<bpmn:messageEventDefinition />
</bpmn:intermediateCatchEvent>
<bpmn:serviceTask id="queue_ready" name="Снять defer, вернуть в ready FIFO">
<bpmn:incoming>queue_Flow_3</bpmn:incoming>
<bpmn:incoming>queue_Flow_4</bpmn:incoming>
<bpmn:outgoing>queue_Flow_5</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:endEvent id="queue_again" name="Новый проход с актуальным снимком">
<bpmn:incoming>queue_Flow_5</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="queue_Flow_0" sourceRef="queue_start" targetRef="queue_wait" name="" />
<bpmn:sequenceFlow id="queue_Flow_1" sourceRef="queue_wait" targetRef="queue_timer" name="" />
<bpmn:sequenceFlow id="queue_Flow_2" sourceRef="queue_wait" targetRef="queue_revision" name="" />
<bpmn:sequenceFlow id="queue_Flow_3" sourceRef="queue_timer" targetRef="queue_ready" name="" />
<bpmn:sequenceFlow id="queue_Flow_4" sourceRef="queue_revision" targetRef="queue_ready" name="" />
<bpmn:sequenceFlow id="queue_Flow_5" sourceRef="queue_ready" targetRef="queue_again" name="" />
</bpmn:process>
<bpmn:process id="checks_Process_checks" name="Профильные ST_REQUEST-проверки: пользователь / проверяющий / алгоритм" isExecutable="false">
<bpmn:documentation>{"notes": ["Схема сверена с предметным описанием и актуальными опубликованными источниками; не является исполняемым workflow."], "sources": [{"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "handlers/open_access_request_accepted.py", "repository": "sharix-open-handlers-examples", "sha256": "5cbb0d1daf3e18ba9b4e20ea981f1d40c61f081f42e911506dd8cce8281f2ee0"}, {"commit": "bc48a53295d7f5be5fa8a0bbee99d8d2b1d658a1", "path": "generated_handler_blocks/open_access_request_accepted.json", "repository": "sharix-open-handlers-examples", "sha256": "1e9f133ff0c3bc7c4b8f3d7926d83c1283d4ce673c09bc594f7b0bf3671a8d29"}, {"commit": "dc3f19fe133828698370477f124b79e6c0239a64", "path": "core/blockly_runtime.py", "repository": "sharix-open-handlers-backend", "sha256": "640e3fe1eaedba273e3cb880553000848c848b8754f740293b0ab80d743ac59e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/assignment.py", "repository": "sharix-open-tickets", "sha256": "2024a49e46668411d3d49ced29041c6d22db7c73f7e4e4757fab4d04bc13876e"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "services/handler_wakeup.py", "repository": "sharix-open-tickets", "sha256": "c9fdc62a18301fd7c075395c697d5b1c738c77713aa71fcbb5ab097e173d98de"}, {"commit": "99498c710fdad3f52f806191e54bd019b8cd3fb1", "path": "models/ticket.py", "repository": "sharix-open-tickets", "sha256": "1a4294d422fe38dd5a5ac055554e232ef60538c82ce77dcae2a13cb5298a09e8"}]}</bpmn:documentation>
<bpmn:laneSet id="checks_Lanes_checks">
<bpmn:lane id="checks_Lane_worker" name="Внешний цикл по документам и RequirementCheck">
<bpmn:flowNodeRef>checks_start</bpmn:flowNodeRef>
<bpmn:flowNodeRef>checks_result</bpmn:flowNodeRef>
<bpmn:flowNodeRef>checks_complete</bpmn:flowNodeRef>
<bpmn:flowNodeRef>checks_ok</bpmn:flowNodeRef>
<bpmn:flowNodeRef>checks_wake</bpmn:flowNodeRef>
<bpmn:flowNodeRef>checks_done</bpmn:flowNodeRef>
<bpmn:flowNodeRef>checks_not_yet</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="checks_start" name="Не хватает обязательного подтверждения">
<bpmn:outgoing>checks_Flow_0</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:task id="checks_result" name="Получить результат профильной проверки">
<bpmn:documentation>Отдельный ручной либо автоматический ST_REQUEST-процесс; он раскрыт на связанных страницах. Загрузка черновика и проверенная версия — разные факты.</bpmn:documentation>
<bpmn:incoming>checks_Flow_0</bpmn:incoming>
<bpmn:outgoing>checks_Flow_1</bpmn:outgoing>
</bpmn:task>
<bpmn:serviceTask id="checks_complete" name="Доменный complete: пересчитать потребителей">
<bpmn:incoming>checks_Flow_1</bpmn:incoming>
<bpmn:outgoing>checks_Flow_2</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="checks_ok" name="Требования permission теперь ok?">
<bpmn:incoming>checks_Flow_2</bpmn:incoming>
<bpmn:outgoing>checks_Flow_3</bpmn:outgoing>
<bpmn:outgoing>checks_Flow_4</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sendTask id="checks_wake" name="Возобновить одобренную активацию: wakeup">
<bpmn:documentation>Для ACCESS_REQUEST обновить Ticket.updated_at и после commit отправить ticket.changed, не активировать permission прямо в ST_REQUEST.</bpmn:documentation>
<bpmn:incoming>checks_Flow_3</bpmn:incoming>
<bpmn:outgoing>checks_Flow_5</bpmn:outgoing>
</bpmn:sendTask>
<bpmn:endEvent id="checks_done" name="Текущий handler получит новое состояние">
<bpmn:incoming>checks_Flow_5</bpmn:incoming>
</bpmn:endEvent>
<bpmn:endEvent id="checks_not_yet" name="Остаются другие невыполненные требования">
<bpmn:incoming>checks_Flow_4</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="checks_Flow_0" sourceRef="checks_start" targetRef="checks_result" name="" />
<bpmn:sequenceFlow id="checks_Flow_1" sourceRef="checks_result" targetRef="checks_complete" name="" />
<bpmn:sequenceFlow id="checks_Flow_2" sourceRef="checks_complete" targetRef="checks_ok" name="" />
<bpmn:sequenceFlow id="checks_Flow_3" sourceRef="checks_ok" targetRef="checks_wake" name="Да" />
<bpmn:sequenceFlow id="checks_Flow_4" sourceRef="checks_ok" targetRef="checks_not_yet" name="Нет" />
<bpmn:sequenceFlow id="checks_Flow_5" sourceRef="checks_wake" targetRef="checks_done" name="" />
</bpmn:process>
<bpmn:collaboration id="Collaboration_access_accepted_waiting">
<bpmn:participant id="queue_Pool_queue" name="Ожидание требований и повторная проверка ACCEPTED" processRef="queue_Process_queue" />
<bpmn:participant id="checks_Pool_checks" name="Профильные ST_REQUEST-проверки: пользователь / проверяющий / алгоритм" processRef="checks_Process_checks" />
<bpmn:messageFlow id="Message_access_accepted_waiting_0" sourceRef="checks_wake" targetRef="queue_revision" name="ticket.changed после commit → scoped refresh" />
</bpmn:collaboration>
<bpmndi:BPMNDiagram id="Diagram_access_accepted_waiting">
<bpmndi:BPMNPlane id="Plane_access_accepted_waiting" bpmnElement="Collaboration_access_accepted_waiting">
<bpmndi:BPMNShape id="queue_DI_Pool_queue" bpmnElement="queue_Pool_queue" isHorizontal="true">
<dc:Bounds x="0.0" y="0.0" width="1360" height="410" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_Lane_worker" bpmnElement="queue_Lane_worker" isHorizontal="true">
<dc:Bounds x="30.0" y="0.0" width="1330" height="410" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_start" bpmnElement="queue_start">
<dc:Bounds x="132.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_wait" bpmnElement="queue_wait">
<dc:Bounds x="375.0" y="85.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_timer" bpmnElement="queue_timer">
<dc:Bounds x="642.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_revision" bpmnElement="queue_revision">
<dc:Bounds x="642.0" y="292.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_ready" bpmnElement="queue_ready">
<dc:Bounds x="865.0" y="75.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="queue_DI_again" bpmnElement="queue_again">
<dc:Bounds x="1182.0" y="92.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="queue_DI_Flow_0" bpmnElement="queue_Flow_0">
<di:waypoint x="168.0" y="110.0" />
<di:waypoint x="375.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="queue_DI_Flow_1" bpmnElement="queue_Flow_1">
<di:waypoint x="425.0" y="110.0" />
<di:waypoint x="642.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="queue_DI_Flow_2" bpmnElement="queue_Flow_2">
<di:waypoint x="425.0" y="110.0" />
<di:waypoint x="533.5" y="110.0" />
<di:waypoint x="533.5" y="310.0" />
<di:waypoint x="642.0" y="310.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="queue_DI_Flow_3" bpmnElement="queue_Flow_3">
<di:waypoint x="678.0" y="110.0" />
<di:waypoint x="865.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="queue_DI_Flow_4" bpmnElement="queue_Flow_4">
<di:waypoint x="678.0" y="310.0" />
<di:waypoint x="771.5" y="310.0" />
<di:waypoint x="771.5" y="110.0" />
<di:waypoint x="865.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="queue_DI_Flow_5" bpmnElement="queue_Flow_5">
<di:waypoint x="1015.0" y="110.0" />
<di:waypoint x="1182.0" y="110.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="checks_DI_Pool_checks" bpmnElement="checks_Pool_checks" isHorizontal="true">
<dc:Bounds x="0.0" y="550.0" width="1690" height="380" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_Lane_worker" bpmnElement="checks_Lane_worker" isHorizontal="true">
<dc:Bounds x="30.0" y="550.0" width="1660" height="380" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_start" bpmnElement="checks_start">
<dc:Bounds x="132.0" y="632.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_result" bpmnElement="checks_result">
<dc:Bounds x="345.0" y="615.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_complete" bpmnElement="checks_complete">
<dc:Bounds x="645.0" y="615.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_ok" bpmnElement="checks_ok">
<dc:Bounds x="975.0" y="625.0" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_wake" bpmnElement="checks_wake">
<dc:Bounds x="1205.0" y="615.0" width="150" height="70" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_done" bpmnElement="checks_done">
<dc:Bounds x="1512.0" y="632.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="checks_DI_not_yet" bpmnElement="checks_not_yet">
<dc:Bounds x="982.0" y="812.0" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="checks_DI_Flow_0" bpmnElement="checks_Flow_0">
<di:waypoint x="168.0" y="650.0" />
<di:waypoint x="345.0" y="650.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="checks_DI_Flow_1" bpmnElement="checks_Flow_1">
<di:waypoint x="495.0" y="650.0" />
<di:waypoint x="645.0" y="650.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="checks_DI_Flow_2" bpmnElement="checks_Flow_2">
<di:waypoint x="795.0" y="650.0" />
<di:waypoint x="975.0" y="650.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="checks_DI_Flow_3" bpmnElement="checks_Flow_3">
<di:waypoint x="1025.0" y="650.0" />
<di:waypoint x="1205.0" y="650.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="checks_DI_Flow_4" bpmnElement="checks_Flow_4">
<di:waypoint x="1000.0" y="675.0" />
<di:waypoint x="1000.0" y="812.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="checks_DI_Flow_5" bpmnElement="checks_Flow_5">
<di:waypoint x="1355.0" y="650.0" />
<di:waypoint x="1512.0" y="650.0" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="DI_Message_access_accepted_waiting_0" bpmnElement="Message_access_accepted_waiting_0">
<di:waypoint x="1280" y="685" />
<di:waypoint x="1400" y="685" />
<di:waypoint x="1400" y="450" />
<di:waypoint x="660" y="450" />
<di:waypoint x="660" y="328" />
<bpmndi:BPMNLabel>
<dc:Bounds x="875" y="405" width="260" height="42" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>Пользователь/проверяющий либо настроенный алгоритм выполняет отдельный профильный процесс. Загрузка черновика документа, создание заявки проверки и проверенная версия документа — разные состояния. Подробные решения описаны в IN_PROCESS и DONE. Здесь показана их связь с ожидающим ACCESS_REQUEST, а не исполнение всех действий внутри этого handler.
Когда профильный complete пересчитывает потребителей и требования permission удовлетворены, resume_approved_activation для ACCESS_REQUEST не активирует право скрыто. Он обновляет ревизию Ticket и после commit отправляет ticket.changed текущему handler. Runtime получает scoped актуальный снимок, снимает прежний defer и снова проходит явные Blockly-проверки. При потере сообщения повтор обеспечивают таймер и periodic reconciliation.
Если остаются другие невыполненные требования, completion одной проверки не означает готовность всего права. Отрицательный результат либо незавершённые документы не должны заменяться ручным выставлением active в обход gate.
Первоначальный ok и результат активации могут различаться: между запросами меняются данные, требования или scope. Runtime обрабатывает часть отрицательных ответов операции активации как false и ждёт ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS; 401/403/429 и 5xx вызывают исключение и общий processing_error. Ошибки read/requirements API и неожиданные ошибки уведомлений также идут в общий retry. Если проблема постоянна, один таймер её не устраняет: нужно разобрать причину и данные.
404 при переходе в CLOSED запрашивает локальную очистку как для устаревшего scope. Если permission уже активировалась, а закрытие Ticket не удалось, активное право не откатывается. Следующий проход заново проверяет ту же связь и gate; он не должен считаться созданием нового права. Для диагностики различайте статус Ticket, status/check_date/checked_by permission, requirements и Event операции.
Уведомления этой ветви:
Это не адресный reviewer API профильных ST_REQUEST. Durable verification ack здесь нет, повторные проходы допускают повтор сообщения; send не доказывает прочтения.
| Причина | Повтор |
|---|---|
related_permission_missing | ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS |
requirements_pending | ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS |
related_permission_inconsistent | ACCESS_REQUEST_INCONSISTENCY_RECHECK_SECONDS |
processing_error | DEFERRED_TICKET_RECHECK_SECONDS |
| Восстановление состава очереди | INTERVAL_TIME_BD_REQ |
Defer хранится в памяти и освобождает worker. Новая authoritative revision снимает ожидание, дубликат того же снимка — нет. Срок означает готовность к проходу, не точное время запуска. При ошибке scoped списка прежний снимок не удаляется как будто backend подтвердил отсутствие Ticket.
Для ручного изменения самого Ticket текущий lifecycle из ACCEPTED разрешает DECLINED либо CLOSED при соответствующих правах; авторство само по себе не даёт права принять/отозвать решение. Перевод Ticket в DECLINED не равен автоматическому удалению уже active permission: соответствующий handler отдельно обрабатывает несогласованность.
Порядок диагностики:
Если permission уже active, а требования стали missing, текущий handler сам её не деактивирует: он ждёт. Текст уведомления «право пока не активировано» не заменяет чтение фактического status.