dodil/erp-method

modules/inventory/signoff/inventory/inventory_standard_price.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_inventory_v7" name="Stock &amp; warehouses processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_inventory_v7">
  <bpmn:documentation>Stock &amp; warehouses: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_inventory_standard_price" name="Standard price" processRef="Process_inventory_standard_price_v7" />
 </bpmn:collaboration>
 <bpmn:process id="Process_inventory_standard_price_v7" name="Standard price" isExecutable="false">
  <bpmn:documentation>Lifecycle of the standard price, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: scheduled, effective.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_standard_price">
   <bpmn:lane id="Lane_standard_price_accountant" name="Finance (bookkeeper, outside accountant)">
    <bpmn:flowNodeRef>Start_standard_price</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_schedule_standard_price</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_standard_price_none__if</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_standard_price_system" name="The system">
    <bpmn:flowNodeRef>Task_intake_standard_price</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_apply_standard_price</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_standard_price_effective</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_standard_price" name="Standard price needed">
   <bpmn:outgoing>Flow_Start_standard_price__Gateway_standard_price_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_schedule_standard_price" name="Set a standard price from a date" dodil:step="schedule_standard_price">
   <bpmn:documentation>By: Finance (bookkeeper, outside accountant). From none to scheduled. When: readiness: starts_after_today; the company values at standard on that date, or switches to it that day. Effect: a dated standard price per company and product (NUMERIC(19,4) per base unit).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_standard_price_none__if__Task_schedule_standard_price</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_schedule_standard_price__Task_apply_standard_price</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_intake_standard_price" name="Take a released roll-up's standard price (v6, INV-60)" dodil:step="intake_standard_price" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to scheduled. When: readiness: starts_after_today; values_at_standard (the company values at standard on valid_from); standard_price_taken (no other price for that company, product and date). Effect: as schedule_standard_price, with set_by the releaser and source_ref; idempotent on (company_code, product_id, valid_from, source_ref).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_standard_price_none__if__Task_intake_standard_price</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_intake_standard_price__Task_apply_standard_price</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:serviceTask id="Task_apply_standard_price" name="The standard price takes effect" dodil:step="apply_standard_price" implementation="##unspecified">
   <bpmn:documentation>By: The system. From scheduled to effective. When: valid_from is today (business_timezone). Effect: a revaluation row of the quantity on hand at the old and new price, and its journal (stock_valuation against revaluation), journal_id derived (company, product, valid_from), posted once.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_schedule_standard_price__Task_apply_standard_price</bpmn:incoming>
   <bpmn:incoming>Flow_Task_intake_standard_price__Task_apply_standard_price</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_apply_standard_price__End_standard_price_effective</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:exclusiveGateway id="Gateway_standard_price_none__if" name="New standard price?">
   <bpmn:incoming>Flow_Start_standard_price__Gateway_standard_price_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_standard_price_none__if__Task_schedule_standard_price</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_standard_price_none__if__Task_intake_standard_price</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_standard_price_effective" name="Standard price effective">
   <bpmn:incoming>Flow_Task_apply_standard_price__End_standard_price_effective</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_standard_price_none__if__Task_schedule_standard_price" sourceRef="Gateway_standard_price_none__if" targetRef="Task_schedule_standard_price" />
  <bpmn:sequenceFlow id="Flow_Gateway_standard_price_none__if__Task_intake_standard_price" sourceRef="Gateway_standard_price_none__if" targetRef="Task_intake_standard_price" />
  <bpmn:sequenceFlow id="Flow_Start_standard_price__Gateway_standard_price_none__if" sourceRef="Start_standard_price" targetRef="Gateway_standard_price_none__if" />
  <bpmn:sequenceFlow id="Flow_Task_schedule_standard_price__Task_apply_standard_price" sourceRef="Task_schedule_standard_price" targetRef="Task_apply_standard_price" />
  <bpmn:sequenceFlow id="Flow_Task_intake_standard_price__Task_apply_standard_price" sourceRef="Task_intake_standard_price" targetRef="Task_apply_standard_price" />
  <bpmn:sequenceFlow id="Flow_Task_apply_standard_price__End_standard_price_effective" sourceRef="Task_apply_standard_price" targetRef="End_standard_price_effective" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_inventory_v7">
  <bpmndi:BPMNPlane id="BPMNPlane_inventory_v7" bpmnElement="Collaboration_inventory_v7">
   <bpmndi:BPMNShape id="Participant_inventory_standard_price_di" bpmnElement="Participant_inventory_standard_price" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="960" height="280" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_standard_price_accountant_di" bpmnElement="Lane_standard_price_accountant" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="930" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_standard_price_system_di" bpmnElement="Lane_standard_price_system" isHorizontal="true">
    <dc:Bounds x="30" y="140" width="930" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_standard_price_di" bpmnElement="Start_standard_price">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_schedule_standard_price_di" bpmnElement="Task_schedule_standard_price">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_intake_standard_price_di" bpmnElement="Task_intake_standard_price">
    <dc:Bounds x="465" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_apply_standard_price_di" bpmnElement="Task_apply_standard_price">
    <dc:Bounds x="635" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_standard_price_none__if_di" bpmnElement="Gateway_standard_price_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_standard_price_effective_di" bpmnElement="End_standard_price_effective">
    <dc:Bounds x="837" y="182" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_standard_price_none__if__Task_schedule_standard_price_di" bpmnElement="Flow_Gateway_standard_price_none__if__Task_schedule_standard_price">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_standard_price_none__if__Task_intake_standard_price_di" bpmnElement="Flow_Gateway_standard_price_none__if__Task_intake_standard_price">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="200" />
    <di:waypoint x="465" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_standard_price__Gateway_standard_price_none__if_di" bpmnElement="Flow_Start_standard_price__Gateway_standard_price_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_schedule_standard_price__Task_apply_standard_price_di" bpmnElement="Flow_Task_schedule_standard_price__Task_apply_standard_price">
    <di:waypoint x="565" y="60" />
    <di:waypoint x="610" y="60" />
    <di:waypoint x="610" y="200" />
    <di:waypoint x="635" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_intake_standard_price__Task_apply_standard_price_di" bpmnElement="Flow_Task_intake_standard_price__Task_apply_standard_price">
    <di:waypoint x="565" y="200" />
    <di:waypoint x="635" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_apply_standard_price__End_standard_price_effective_di" bpmnElement="Flow_Task_apply_standard_price__End_standard_price_effective">
    <di:waypoint x="735" y="200" />
    <di:waypoint x="837" y="200" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>