<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"
targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="Process_AddRecipe" name="Добавление нового рецепта" isExecutable="true">
<bpmn:startEvent id="StartEvent" name="Автор хочет добавить рецепт" />
<bpmn:userTask id="Task_Auth" name="Авторизация в системе" />
<bpmn:sequenceFlow id="Flow1" sourceRef="StartEvent" targetRef="Task_Auth" />
<bpmn:exclusiveGateway id="Gateway_CheckAuth" name="Авторизован?" />
<bpmn:sequenceFlow id="Flow2" sourceRef="Task_Auth" targetRef="Gateway_CheckAuth" />
<bpmn:userTask id="Task_Register" name="Регистрация нового автора" />
<bpmn:sequenceFlow id="Flow_NoAuth" sourceRef="Gateway_CheckAuth" targetRef="Task_Register">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">false</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_AfterReg" sourceRef="Task_Register" targetRef="Gateway_CheckAuth" />
<bpmn:userTask id="Task_FillForm" name="Заполнение информации о рецепте">
<bpmn:potentialOwner>
<bpmn:resourceAssignmentExpression>
<bpmn:formalExpression>Автор</bpmn:formalExpression>
</bpmn:resourceAssignmentExpression>
</bpmn:potentialOwner>
</bpmn:userTask>
<bpmn:sequenceFlow id="Flow_Auth" sourceRef="Gateway_CheckAuth" targetRef="Task_FillForm">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">true</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Task_AddIngredients" name="Добавление ингредиентов (кол-во, единицы)" />
<bpmn:sequenceFlow id="Flow3" sourceRef="Task_FillForm" targetRef="Task_AddIngredients" />
<bpmn:userTask id="Task_SelectCategory" name="Выбор категории блюда" />
<bpmn:sequenceFlow id="Flow4" sourceRef="Task_AddIngredients" targetRef="Task_SelectCategory" />
<bpmn:exclusiveGateway id="Gateway_Validate" name="Данные корректны?" />
<bpmn:sequenceFlow id="Flow5" sourceRef="Task_SelectCategory" targetRef="Gateway_Validate" />
<bpmn:sequenceFlow id="Flow_Invalid" sourceRef="Gateway_Validate" targetRef="Task_FillForm">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">false</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:serviceTask id="Task_SaveDB" name="Сохранение рецепта в базу данных" />
<bpmn:sequenceFlow id="Flow_Valid" sourceRef="Gateway_Validate" targetRef="Task_SaveDB">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">true</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:intermediateThrowEvent id="Event_Notify" name="Уведомление об успешной публикации" />
<bpmn:sequenceFlow id="Flow7" sourceRef="Task_SaveDB" targetRef="Event_Notify" />
<bpmn:endEvent id="EndEvent" name="Рецепт опубликован" />
<bpmn:sequenceFlow id="Flow8" sourceRef="Event_Notify" targetRef="EndEvent" />
</bpmn:process>
</bpmn:definitions>