dodil/erp-method
modules/fixed-assets/signoff/fixed-assets/history/fixed-assets_depreciation_run.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_fixed-assets_v1" name="Fixed assets & depreciation processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_fixed-assets_v1">
<bpmn:documentation>Fixed assets & depreciation: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_fixed-assets_depreciation_run" name="Depreciation run" processRef="Process_fixed-assets_depreciation_run_v1" />
</bpmn:collaboration>
<bpmn:process id="Process_fixed-assets_depreciation_run_v1" name="Depreciation run" isExecutable="false">
<bpmn:documentation>Lifecycle of the depreciation run, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: simulated, approved, posted, reversed.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_depreciation_run">
<bpmn:lane id="Lane_depreciation_run_asset_accountant" name="the person who keeps the asset register (financial accountant, bookkeeper)">
<bpmn:flowNodeRef>Start_depreciation_run</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_simulate_depreciation</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_resimulate_depreciation</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_depreciation_run_finance_approver" name="the financial controller (finance manager)">
<bpmn:flowNodeRef>Task_approve_depreciation_run</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_reverse_depreciation_run</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_depreciation_run_simulated__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_depreciation_run_reversed</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_depreciation_run_system" name="The system">
<bpmn:flowNodeRef>Task_post_depreciation_run</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_post_unapproved_run</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_depreciation_run" name="Depreciation run needed">
<bpmn:outgoing>Flow_Start_depreciation_run__Task_simulate_depreciation</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="Task_simulate_depreciation" name="Simulate the period" dodil:step="simulate_depreciation">
<bpmn:documentation>By: the person who keeps the asset register (financial accountant, bookkeeper). From none to simulated. When: a period of an open asset year, not after today's period. Effect: planned-to-date minus posted per asset, area and period; keyed (company_code, period_id, run_no); nothing posted.</bpmn:documentation>
<bpmn:incoming>Flow_Start_depreciation_run__Task_simulate_depreciation</bpmn:incoming>
<bpmn:outgoing>Flow_Task_simulate_depreciation__Task_resimulate_depreciation</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_resimulate_depreciation" name="Simulate again after a change" dodil:step="resimulate_depreciation">
<bpmn:documentation>By: the person who keeps the asset register (financial accountant, bookkeeper). From simulated to simulated. Effect: the figures recomputed from rows.</bpmn:documentation>
<bpmn:incoming>Flow_Task_simulate_depreciation__Task_resimulate_depreciation</bpmn:incoming>
<bpmn:outgoing>Flow_Task_resimulate_depreciation__Gateway_depreciation_run_simulated__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_approve_depreciation_run" name="Approve the run" dodil:step="approve_depreciation_run" dodil:approval="true">
<bpmn:documentation>By: the financial controller (finance manager). From simulated to approved. When: the approver did not start the run (email AND sub); no gate fails (usage_missing, account_determination). Effect: who, when (today in the business time zone). An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_depreciation_run_simulated__if__Task_approve_depreciation_run</bpmn:incoming>
<bpmn:outgoing>Flow_Task_approve_depreciation_run__Task_post_depreciation_run</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_post_depreciation_run" name="Post the run per area to its ledger" dodil:step="post_depreciation_run" implementation="##unspecified">
<bpmn:documentation>By: The system. From approved to posted. When: each posting area's ledger period is open. Effect: one journal per area, keyed derived_id(run_id, area); posted rows per asset, area and period.</bpmn:documentation>
<bpmn:incoming>Flow_Task_approve_depreciation_run__Task_post_depreciation_run</bpmn:incoming>
<bpmn:outgoing>Flow_Task_post_depreciation_run__Task_reverse_depreciation_run</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_post_unapproved_run" name="Post without a second person (owner switched it off)" dodil:step="post_unapproved_run" implementation="##unspecified">
<bpmn:documentation>By: The system. From simulated to posted. When: the owner's control depreciation_needs_approval is false. Effect: as post_depreciation_run; the starter recorded as poster.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_depreciation_run_simulated__if__Task_post_unapproved_run</bpmn:incoming>
<bpmn:outgoing>Flow_Task_post_unapproved_run__Task_reverse_depreciation_run</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_reverse_depreciation_run" name="Reverse the run" dodil:step="reverse_depreciation_run" dodil:approval="true">
<bpmn:documentation>By: the financial controller (finance manager). From posted to reversed. When: the year is not closed; the period of today is open. Requires: reason. Effect: reversing journals per area dated today; reversing posted rows; the next run plans the period again. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Task_post_depreciation_run__Task_reverse_depreciation_run</bpmn:incoming>
<bpmn:incoming>Flow_Task_post_unapproved_run__Task_reverse_depreciation_run</bpmn:incoming>
<bpmn:outgoing>Flow_Task_reverse_depreciation_run__End_depreciation_run_reversed</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_depreciation_run_simulated__if" name="Depreciation run simulated: what next?">
<bpmn:incoming>Flow_Task_resimulate_depreciation__Gateway_depreciation_run_simulated__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_depreciation_run_simulated__if__Task_approve_depreciation_run</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_depreciation_run_simulated__if__Task_post_unapproved_run</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_depreciation_run_reversed" name="Depreciation run reversed">
<bpmn:incoming>Flow_Task_reverse_depreciation_run__End_depreciation_run_reversed</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Start_depreciation_run__Task_simulate_depreciation" sourceRef="Start_depreciation_run" targetRef="Task_simulate_depreciation" />
<bpmn:sequenceFlow id="Flow_Gateway_depreciation_run_simulated__if__Task_approve_depreciation_run" sourceRef="Gateway_depreciation_run_simulated__if" targetRef="Task_approve_depreciation_run" />
<bpmn:sequenceFlow id="Flow_Gateway_depreciation_run_simulated__if__Task_post_unapproved_run" sourceRef="Gateway_depreciation_run_simulated__if" targetRef="Task_post_unapproved_run" />
<bpmn:sequenceFlow id="Flow_Task_resimulate_depreciation__Gateway_depreciation_run_simulated__if" sourceRef="Task_resimulate_depreciation" targetRef="Gateway_depreciation_run_simulated__if" />
<bpmn:sequenceFlow id="Flow_Task_simulate_depreciation__Task_resimulate_depreciation" sourceRef="Task_simulate_depreciation" targetRef="Task_resimulate_depreciation" />
<bpmn:sequenceFlow id="Flow_Task_approve_depreciation_run__Task_post_depreciation_run" sourceRef="Task_approve_depreciation_run" targetRef="Task_post_depreciation_run" />
<bpmn:sequenceFlow id="Flow_Task_post_depreciation_run__Task_reverse_depreciation_run" sourceRef="Task_post_depreciation_run" targetRef="Task_reverse_depreciation_run" />
<bpmn:sequenceFlow id="Flow_Task_post_unapproved_run__Task_reverse_depreciation_run" sourceRef="Task_post_unapproved_run" targetRef="Task_reverse_depreciation_run" />
<bpmn:sequenceFlow id="Flow_Task_reverse_depreciation_run__End_depreciation_run_reversed" sourceRef="Task_reverse_depreciation_run" targetRef="End_depreciation_run_reversed" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_fixed-assets_v1">
<bpmndi:BPMNPlane id="BPMNPlane_fixed-assets_v1" bpmnElement="Collaboration_fixed-assets_v1">
<bpmndi:BPMNShape id="Participant_fixed-assets_depreciation_run_di" bpmnElement="Participant_fixed-assets_depreciation_run" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1300" height="420" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_depreciation_run_asset_accountant_di" bpmnElement="Lane_depreciation_run_asset_accountant" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_depreciation_run_finance_approver_di" bpmnElement="Lane_depreciation_run_finance_approver" isHorizontal="true">
<dc:Bounds x="30" y="140" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_depreciation_run_system_di" bpmnElement="Lane_depreciation_run_system" isHorizontal="true">
<dc:Bounds x="30" y="280" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_depreciation_run_di" bpmnElement="Start_depreciation_run">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_simulate_depreciation_di" bpmnElement="Task_simulate_depreciation">
<dc:Bounds x="295" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_resimulate_depreciation_di" bpmnElement="Task_resimulate_depreciation">
<dc:Bounds x="465" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_approve_depreciation_run_di" bpmnElement="Task_approve_depreciation_run">
<dc:Bounds x="805" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_post_depreciation_run_di" bpmnElement="Task_post_depreciation_run">
<dc:Bounds x="975" y="300" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_post_unapproved_run_di" bpmnElement="Task_post_unapproved_run">
<dc:Bounds x="805" y="300" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_reverse_depreciation_run_di" bpmnElement="Task_reverse_depreciation_run">
<dc:Bounds x="975" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_depreciation_run_simulated__if_di" bpmnElement="Gateway_depreciation_run_simulated__if">
<dc:Bounds x="660" y="175" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_depreciation_run_reversed_di" bpmnElement="End_depreciation_run_reversed">
<dc:Bounds x="1177" y="182" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Start_depreciation_run__Task_simulate_depreciation_di" bpmnElement="Flow_Start_depreciation_run__Task_simulate_depreciation">
<di:waypoint x="193" y="60" />
<di:waypoint x="295" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_depreciation_run_simulated__if__Task_approve_depreciation_run_di" bpmnElement="Flow_Gateway_depreciation_run_simulated__if__Task_approve_depreciation_run">
<di:waypoint x="710" y="200" />
<di:waypoint x="805" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_depreciation_run_simulated__if__Task_post_unapproved_run_di" bpmnElement="Flow_Gateway_depreciation_run_simulated__if__Task_post_unapproved_run">
<di:waypoint x="710" y="200" />
<di:waypoint x="780" y="200" />
<di:waypoint x="780" y="340" />
<di:waypoint x="805" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_resimulate_depreciation__Gateway_depreciation_run_simulated__if_di" bpmnElement="Flow_Task_resimulate_depreciation__Gateway_depreciation_run_simulated__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_Task_simulate_depreciation__Task_resimulate_depreciation_di" bpmnElement="Flow_Task_simulate_depreciation__Task_resimulate_depreciation">
<di:waypoint x="395" y="60" />
<di:waypoint x="465" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_approve_depreciation_run__Task_post_depreciation_run_di" bpmnElement="Flow_Task_approve_depreciation_run__Task_post_depreciation_run">
<di:waypoint x="905" y="200" />
<di:waypoint x="950" y="200" />
<di:waypoint x="950" y="340" />
<di:waypoint x="975" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_post_depreciation_run__Task_reverse_depreciation_run_di" bpmnElement="Flow_Task_post_depreciation_run__Task_reverse_depreciation_run">
<di:waypoint x="1025" y="380" />
<di:waypoint x="1025" y="395" />
<di:waypoint x="1025" y="395" />
<di:waypoint x="1025" y="240" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_post_unapproved_run__Task_reverse_depreciation_run_di" bpmnElement="Flow_Task_post_unapproved_run__Task_reverse_depreciation_run">
<di:waypoint x="905" y="340" />
<di:waypoint x="950" y="340" />
<di:waypoint x="950" y="200" />
<di:waypoint x="975" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_reverse_depreciation_run__End_depreciation_run_reversed_di" bpmnElement="Flow_Task_reverse_depreciation_run__End_depreciation_run_reversed">
<di:waypoint x="1075" y="200" />
<di:waypoint x="1177" y="200" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>