dodil/erp-method
modules/product/signoff/product/history/product_price_list.v1.bpmn
<?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" xmlns:dodil="https://git.dodil.io/dodil/erp-platform/bpmn/1" id="Definitions_product_v1" name="Products & price lists processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_product_v1">
<bpmn:documentation>Products & price lists: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_product_price_list" name="Price list" processRef="Process_product_price_list_v1" />
</bpmn:collaboration>
<bpmn:process id="Process_product_price_list_v1" name="Price list" isExecutable="false">
<bpmn:documentation>Lifecycle of the price list, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, published, retired. Note: the CURRENT price is derived on read from the dated rows (PRD-11); nothing stores it</bpmn:documentation>
<bpmn:laneSet id="LaneSet_price_list">
<bpmn:lane id="Lane_price_list_pricing_manager" name="Whoever sets prices (the owner, a commercial manager)">
<bpmn:flowNodeRef>Start_price_list</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_open_price_list</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_set_prices</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_publish_price_list</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_change_prices</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_assign_customer</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_retire_price_list</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_price_list_retired</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_price_list_system" name="The system">
<bpmn:flowNodeRef>Task_ai_price_check</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_ai_price_check__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_ai_price_check__if_end</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_price_list" name="Price list needed">
<bpmn:outgoing>Flow_Start_price_list__Task_open_price_list</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="Task_open_price_list" name="Open a price list" dodil:step="open_price_list">
<bpmn:documentation>By: Whoever sets prices (the owner, a commercial manager). From none to draft. When: a currency (ISO 4217). Effect: based on another list, or standalone.</bpmn:documentation>
<bpmn:incoming>Flow_Start_price_list__Task_open_price_list</bpmn:incoming>
<bpmn:outgoing>Flow_Task_open_price_list__Task_set_prices</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_set_prices" name="Set prices and rules" dodil:step="set_prices">
<bpmn:documentation>By: Whoever sets prices (the owner, a commercial manager). From draft to draft. Effect: dated rows; nothing visible to sales yet.</bpmn:documentation>
<bpmn:incoming>Flow_Task_open_price_list__Task_set_prices</bpmn:incoming>
<bpmn:outgoing>Flow_Task_set_prices__Gateway_ai_price_check__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_ai_price_check" name="AI flags unusual prices (suggest)" dodil:step="ai_price_check" implementation="##unspecified">
<bpmn:documentation>By: The system. From draft to draft. When: the price check is on. Effect: outliers against the base list and similar products are listed for the pricing manager.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_ai_price_check__if__Task_ai_price_check</bpmn:incoming>
<bpmn:outgoing>Flow_Task_ai_price_check__Gateway_ai_price_check__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_publish_price_list" name="Publish the price list" dodil:step="publish_price_list" dodil:approval="true">
<bpmn:documentation>By: Whoever sets prices (the owner, a commercial manager). From draft to published. When: every row has a currency and a valid_from; the approver is not the author where the setting asks for one. Effect: sales prices from it on each row's valid_from. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_ai_price_check__if_end__Task_publish_price_list</bpmn:incoming>
<bpmn:outgoing>Flow_Task_publish_price_list__Task_change_prices</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_change_prices" name="Schedule a price change" dodil:step="change_prices" dodil:approval="true">
<bpmn:documentation>By: Whoever sets prices (the owner, a commercial manager). From published to published. Effect: new rows with a later valid_from; old rows are never edited. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Task_publish_price_list__Task_change_prices</bpmn:incoming>
<bpmn:outgoing>Flow_Task_change_prices__Task_assign_customer</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_assign_customer" name="Assign customers to the list" dodil:step="assign_customer">
<bpmn:documentation>By: Whoever sets prices (the owner, a commercial manager). From published to published. Effect: their prices in this currency resolve from this list.</bpmn:documentation>
<bpmn:incoming>Flow_Task_change_prices__Task_assign_customer</bpmn:incoming>
<bpmn:outgoing>Flow_Task_assign_customer__Task_retire_price_list</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_retire_price_list" name="Retire the price list" dodil:step="retire_price_list">
<bpmn:documentation>By: Whoever sets prices (the owner, a commercial manager). From published to retired. When: not the default list of its currency. Effect: assigned customers fall back to the default list.</bpmn:documentation>
<bpmn:incoming>Flow_Task_assign_customer__Task_retire_price_list</bpmn:incoming>
<bpmn:outgoing>Flow_Task_retire_price_list__End_price_list_retired</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_ai_price_check__if" name="the price check is on?">
<bpmn:incoming>Flow_Task_set_prices__Gateway_ai_price_check__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_ai_price_check__if__Task_ai_price_check</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_ai_price_check__if__Gateway_ai_price_check__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_ai_price_check__if_end">
<bpmn:incoming>Flow_Gateway_ai_price_check__if__Gateway_ai_price_check__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_ai_price_check__Gateway_ai_price_check__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_ai_price_check__if_end__Task_publish_price_list</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_price_list_retired" name="Price list retired">
<bpmn:incoming>Flow_Task_retire_price_list__End_price_list_retired</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Start_price_list__Task_open_price_list" sourceRef="Start_price_list" targetRef="Task_open_price_list" />
<bpmn:sequenceFlow id="Flow_Gateway_ai_price_check__if__Task_ai_price_check" name="the price check is on" sourceRef="Gateway_ai_price_check__if" targetRef="Task_ai_price_check" />
<bpmn:sequenceFlow id="Flow_Gateway_ai_price_check__if__Gateway_ai_price_check__if_end" name="otherwise" sourceRef="Gateway_ai_price_check__if" targetRef="Gateway_ai_price_check__if_end" />
<bpmn:sequenceFlow id="Flow_Task_ai_price_check__Gateway_ai_price_check__if_end" sourceRef="Task_ai_price_check" targetRef="Gateway_ai_price_check__if_end" />
<bpmn:sequenceFlow id="Flow_Task_set_prices__Gateway_ai_price_check__if" sourceRef="Task_set_prices" targetRef="Gateway_ai_price_check__if" />
<bpmn:sequenceFlow id="Flow_Gateway_ai_price_check__if_end__Task_publish_price_list" sourceRef="Gateway_ai_price_check__if_end" targetRef="Task_publish_price_list" />
<bpmn:sequenceFlow id="Flow_Task_open_price_list__Task_set_prices" sourceRef="Task_open_price_list" targetRef="Task_set_prices" />
<bpmn:sequenceFlow id="Flow_Task_change_prices__Task_assign_customer" sourceRef="Task_change_prices" targetRef="Task_assign_customer" />
<bpmn:sequenceFlow id="Flow_Task_assign_customer__Task_retire_price_list" sourceRef="Task_assign_customer" targetRef="Task_retire_price_list" />
<bpmn:sequenceFlow id="Flow_Task_publish_price_list__Task_change_prices" sourceRef="Task_publish_price_list" targetRef="Task_change_prices" />
<bpmn:sequenceFlow id="Flow_Task_retire_price_list__End_price_list_retired" sourceRef="Task_retire_price_list" targetRef="End_price_list_retired" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_product_v1">
<bpmndi:BPMNPlane id="BPMNPlane_product_v1" bpmnElement="Collaboration_product_v1">
<bpmndi:BPMNShape id="Participant_product_price_list_di" bpmnElement="Participant_product_price_list" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1810" height="400" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_price_list_pricing_manager_di" bpmnElement="Lane_price_list_pricing_manager" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1780" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_price_list_system_di" bpmnElement="Lane_price_list_system" isHorizontal="true">
<dc:Bounds x="30" y="140" width="1780" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_price_list_di" bpmnElement="Start_price_list">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_open_price_list_di" bpmnElement="Task_open_price_list">
<dc:Bounds x="295" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_set_prices_di" bpmnElement="Task_set_prices">
<dc:Bounds x="465" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_ai_price_check_di" bpmnElement="Task_ai_price_check">
<dc:Bounds x="805" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_publish_price_list_di" bpmnElement="Task_publish_price_list">
<dc:Bounds x="975" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_change_prices_di" bpmnElement="Task_change_prices">
<dc:Bounds x="1145" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_assign_customer_di" bpmnElement="Task_assign_customer">
<dc:Bounds x="1315" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_retire_price_list_di" bpmnElement="Task_retire_price_list">
<dc:Bounds x="1485" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_ai_price_check__if_di" bpmnElement="Gateway_ai_price_check__if">
<dc:Bounds x="660" y="175" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_ai_price_check__if_end_di" bpmnElement="Gateway_ai_price_check__if_end">
<dc:Bounds x="830" y="295" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_price_list_retired_di" bpmnElement="End_price_list_retired">
<dc:Bounds x="1687" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Start_price_list__Task_open_price_list_di" bpmnElement="Flow_Start_price_list__Task_open_price_list">
<di:waypoint x="193" y="60" />
<di:waypoint x="295" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_ai_price_check__if__Task_ai_price_check_di" bpmnElement="Flow_Gateway_ai_price_check__if__Task_ai_price_check">
<di:waypoint x="710" y="200" />
<di:waypoint x="805" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_ai_price_check__if__Gateway_ai_price_check__if_end_di" bpmnElement="Flow_Gateway_ai_price_check__if__Gateway_ai_price_check__if_end">
<di:waypoint x="710" y="200" />
<di:waypoint x="805" y="200" />
<di:waypoint x="805" y="320" />
<di:waypoint x="830" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_ai_price_check__Gateway_ai_price_check__if_end_di" bpmnElement="Flow_Task_ai_price_check__Gateway_ai_price_check__if_end">
<di:waypoint x="855" y="240" />
<di:waypoint x="855" y="360" />
<di:waypoint x="855" y="360" />
<di:waypoint x="855" y="345" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_set_prices__Gateway_ai_price_check__if_di" bpmnElement="Flow_Task_set_prices__Gateway_ai_price_check__if">
<di:waypoint x="565" y="60" />
<di:waypoint x="635" y="60" />
<di:waypoint x="635" y="200" />
<di:waypoint x="660" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_ai_price_check__if_end__Task_publish_price_list_di" bpmnElement="Flow_Gateway_ai_price_check__if_end__Task_publish_price_list">
<di:waypoint x="880" y="320" />
<di:waypoint x="950" y="320" />
<di:waypoint x="950" y="60" />
<di:waypoint x="975" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_open_price_list__Task_set_prices_di" bpmnElement="Flow_Task_open_price_list__Task_set_prices">
<di:waypoint x="395" y="60" />
<di:waypoint x="465" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_change_prices__Task_assign_customer_di" bpmnElement="Flow_Task_change_prices__Task_assign_customer">
<di:waypoint x="1245" y="60" />
<di:waypoint x="1315" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_assign_customer__Task_retire_price_list_di" bpmnElement="Flow_Task_assign_customer__Task_retire_price_list">
<di:waypoint x="1415" y="60" />
<di:waypoint x="1485" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_publish_price_list__Task_change_prices_di" bpmnElement="Flow_Task_publish_price_list__Task_change_prices">
<di:waypoint x="1075" y="60" />
<di:waypoint x="1145" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_retire_price_list__End_price_list_retired_di" bpmnElement="Flow_Task_retire_price_list__End_price_list_retired">
<di:waypoint x="1585" y="60" />
<di:waypoint x="1687" y="60" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>