dodil/erp-method
modules/manufacturing/signoff/manufacturing/history/manufacturing_cost_rollup.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_manufacturing_v1" name="Production (bills of materials and production orders) processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_manufacturing_v1">
<bpmn:documentation>Production (bills of materials and production orders): one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_manufacturing_cost_rollup" name="Cost rollup" processRef="Process_manufacturing_cost_rollup_v1" />
</bpmn:collaboration>
<bpmn:process id="Process_manufacturing_cost_rollup_v1" name="Cost rollup" isExecutable="false">
<bpmn:documentation>Lifecycle of the cost rollup, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: computed, approved, released, stale.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_cost_rollup">
<bpmn:lane id="Lane_cost_rollup_cost_accountant" name="Cost accountant">
<bpmn:flowNodeRef>Start_cost_rollup</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_run_rollup</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_approve_rollup</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_release_rollup</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_cost_rollup_computed__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_cost_rollup_approved__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_cost_rollup_released</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_cost_rollup_system" name="The system">
<bpmn:flowNodeRef>Task_mark_rollup_stale</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_cost_rollup_stale</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_cost_rollup" name="Cost rollup needed">
<bpmn:outgoing>Flow_Start_cost_rollup__Task_run_rollup</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="Task_run_rollup" name="Run the roll-up" dodil:step="run_rollup">
<bpmn:documentation>By: Cost accountant. From none to computed. When: every component has a standard price on the effective date.</bpmn:documentation>
<bpmn:incoming>Flow_Start_cost_rollup__Task_run_rollup</bpmn:incoming>
<bpmn:outgoing>Flow_Task_run_rollup__Gateway_cost_rollup_computed__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_approve_rollup" name="Approve" dodil:step="approve_rollup" dodil:approval="true">
<bpmn:documentation>By: Cost accountant. From computed to approved. When: the approver did not run it (email AND sub). An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cost_rollup_computed__if__Task_approve_rollup</bpmn:incoming>
<bpmn:outgoing>Flow_Task_approve_rollup__Gateway_cost_rollup_approved__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_release_rollup" name="Release to inventory" dodil:step="release_rollup">
<bpmn:documentation>By: Cost accountant. From approved to released. When: not stale; effective date after today. Effect: standard prices handed to inventory from pending rows.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cost_rollup_approved__if__Task_release_rollup</bpmn:incoming>
<bpmn:outgoing>Flow_Task_release_rollup__End_cost_rollup_released</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_mark_rollup_stale" name="Stale" dodil:step="mark_rollup_stale" implementation="##unspecified">
<bpmn:documentation>By: The system. From computed / approved to stale. When: an input changed (MFG-18).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cost_rollup_computed__if__Task_mark_rollup_stale</bpmn:incoming>
<bpmn:incoming>Flow_Gateway_cost_rollup_approved__if__Task_mark_rollup_stale</bpmn:incoming>
<bpmn:outgoing>Flow_Task_mark_rollup_stale__End_cost_rollup_stale</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_cost_rollup_computed__if" name="Cost rollup computed: what next?">
<bpmn:incoming>Flow_Task_run_rollup__Gateway_cost_rollup_computed__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_cost_rollup_computed__if__Task_approve_rollup</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_cost_rollup_computed__if__Task_mark_rollup_stale</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_cost_rollup_approved__if" name="Cost rollup approved: what next?">
<bpmn:incoming>Flow_Task_approve_rollup__Gateway_cost_rollup_approved__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_cost_rollup_approved__if__Task_release_rollup</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_cost_rollup_approved__if__Task_mark_rollup_stale</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_cost_rollup_released" name="Cost rollup released">
<bpmn:incoming>Flow_Task_release_rollup__End_cost_rollup_released</bpmn:incoming>
</bpmn:endEvent>
<bpmn:endEvent id="End_cost_rollup_stale" name="Cost rollup stale">
<bpmn:incoming>Flow_Task_mark_rollup_stale__End_cost_rollup_stale</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Start_cost_rollup__Task_run_rollup" sourceRef="Start_cost_rollup" targetRef="Task_run_rollup" />
<bpmn:sequenceFlow id="Flow_Gateway_cost_rollup_computed__if__Task_approve_rollup" sourceRef="Gateway_cost_rollup_computed__if" targetRef="Task_approve_rollup" />
<bpmn:sequenceFlow id="Flow_Gateway_cost_rollup_computed__if__Task_mark_rollup_stale" sourceRef="Gateway_cost_rollup_computed__if" targetRef="Task_mark_rollup_stale" />
<bpmn:sequenceFlow id="Flow_Task_run_rollup__Gateway_cost_rollup_computed__if" sourceRef="Task_run_rollup" targetRef="Gateway_cost_rollup_computed__if" />
<bpmn:sequenceFlow id="Flow_Gateway_cost_rollup_approved__if__Task_release_rollup" sourceRef="Gateway_cost_rollup_approved__if" targetRef="Task_release_rollup" />
<bpmn:sequenceFlow id="Flow_Gateway_cost_rollup_approved__if__Task_mark_rollup_stale" sourceRef="Gateway_cost_rollup_approved__if" targetRef="Task_mark_rollup_stale" />
<bpmn:sequenceFlow id="Flow_Task_approve_rollup__Gateway_cost_rollup_approved__if" sourceRef="Task_approve_rollup" targetRef="Gateway_cost_rollup_approved__if" />
<bpmn:sequenceFlow id="Flow_Task_release_rollup__End_cost_rollup_released" sourceRef="Task_release_rollup" targetRef="End_cost_rollup_released" />
<bpmn:sequenceFlow id="Flow_Task_mark_rollup_stale__End_cost_rollup_stale" sourceRef="Task_mark_rollup_stale" targetRef="End_cost_rollup_stale" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_manufacturing_v1">
<bpmndi:BPMNPlane id="BPMNPlane_manufacturing_v1" bpmnElement="Collaboration_manufacturing_v1">
<bpmndi:BPMNShape id="Participant_manufacturing_cost_rollup_di" bpmnElement="Participant_manufacturing_cost_rollup" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1300" height="280" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_cost_rollup_cost_accountant_di" bpmnElement="Lane_cost_rollup_cost_accountant" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_cost_rollup_system_di" bpmnElement="Lane_cost_rollup_system" isHorizontal="true">
<dc:Bounds x="30" y="140" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_cost_rollup_di" bpmnElement="Start_cost_rollup">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_run_rollup_di" bpmnElement="Task_run_rollup">
<dc:Bounds x="295" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_approve_rollup_di" bpmnElement="Task_approve_rollup">
<dc:Bounds x="635" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_release_rollup_di" bpmnElement="Task_release_rollup">
<dc:Bounds x="975" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_mark_rollup_stale_di" bpmnElement="Task_mark_rollup_stale">
<dc:Bounds x="635" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_cost_rollup_computed__if_di" bpmnElement="Gateway_cost_rollup_computed__if">
<dc:Bounds x="490" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_cost_rollup_approved__if_di" bpmnElement="Gateway_cost_rollup_approved__if">
<dc:Bounds x="830" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_cost_rollup_released_di" bpmnElement="End_cost_rollup_released">
<dc:Bounds x="1177" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_cost_rollup_stale_di" bpmnElement="End_cost_rollup_stale">
<dc:Bounds x="837" y="182" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Start_cost_rollup__Task_run_rollup_di" bpmnElement="Flow_Start_cost_rollup__Task_run_rollup">
<di:waypoint x="193" y="60" />
<di:waypoint x="295" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_cost_rollup_computed__if__Task_approve_rollup_di" bpmnElement="Flow_Gateway_cost_rollup_computed__if__Task_approve_rollup">
<di:waypoint x="540" y="60" />
<di:waypoint x="635" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_cost_rollup_computed__if__Task_mark_rollup_stale_di" bpmnElement="Flow_Gateway_cost_rollup_computed__if__Task_mark_rollup_stale">
<di:waypoint x="540" 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_run_rollup__Gateway_cost_rollup_computed__if_di" bpmnElement="Flow_Task_run_rollup__Gateway_cost_rollup_computed__if">
<di:waypoint x="395" y="60" />
<di:waypoint x="490" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_cost_rollup_approved__if__Task_release_rollup_di" bpmnElement="Flow_Gateway_cost_rollup_approved__if__Task_release_rollup">
<di:waypoint x="880" y="60" />
<di:waypoint x="975" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_cost_rollup_approved__if__Task_mark_rollup_stale_di" bpmnElement="Flow_Gateway_cost_rollup_approved__if__Task_mark_rollup_stale">
<di:waypoint x="855" y="85" />
<di:waypoint x="855" y="255" />
<di:waypoint x="685" y="255" />
<di:waypoint x="685" y="240" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_approve_rollup__Gateway_cost_rollup_approved__if_di" bpmnElement="Flow_Task_approve_rollup__Gateway_cost_rollup_approved__if">
<di:waypoint x="735" y="60" />
<di:waypoint x="830" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_release_rollup__End_cost_rollup_released_di" bpmnElement="Flow_Task_release_rollup__End_cost_rollup_released">
<di:waypoint x="1075" y="60" />
<di:waypoint x="1177" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_mark_rollup_stale__End_cost_rollup_stale_di" bpmnElement="Flow_Task_mark_rollup_stale__End_cost_rollup_stale">
<di:waypoint x="735" y="200" />
<di:waypoint x="837" y="200" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>