dodil/erp-method
modules/consolidation/signoff/consolidation/history/consolidation_cons_journal.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_consolidation_v1" name="Group consolidation processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_consolidation_v1">
<bpmn:documentation>Group consolidation: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_consolidation_cons_journal" name="Cons journal" processRef="Process_consolidation_cons_journal_v1" />
</bpmn:collaboration>
<bpmn:process id="Process_consolidation_cons_journal_v1" name="Cons journal" isExecutable="false">
<bpmn:documentation>Lifecycle of the cons journal, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: proposed, posted, rejected, reversed.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_cons_journal">
<bpmn:lane id="Lane_cons_journal_system" name="The system">
<bpmn:flowNodeRef>Start_cons_journal</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_post_cons_auto_entry</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_cons_journal_none__if</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_cons_journal_group_accountant" name="Group accountant">
<bpmn:flowNodeRef>Task_propose_cons_entry</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_reverse_cons_entry</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_cons_journal_reversed</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_cons_journal_group_controller" name="Group finance controller">
<bpmn:flowNodeRef>Task_approve_cons_entry</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_reject_cons_entry</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_cons_journal_proposed__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_cons_journal_rejected</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_cons_journal" name="Cons journal needed">
<bpmn:outgoing>Flow_Start_cons_journal__Gateway_cons_journal_none__if</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:serviceTask id="Task_post_cons_auto_entry" name="Post an automatic consolidation entry" dodil:step="post_cons_auto_entry" implementation="##unspecified">
<bpmn:documentation>By: The system. From none to posted. When: balanced in group currency; the period not signed; keyed derived_id('cons', group, period, task, company, partner, run_no). Effect: numbered in the group's book and year; a replay answers the entry posted; the previous run's entry for the key reversed.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cons_journal_none__if__Task_post_cons_auto_entry</bpmn:incoming>
<bpmn:outgoing>Flow_Task_post_cons_auto_entry__Task_reverse_cons_entry</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_propose_cons_entry" name="Propose a manual consolidation entry" dodil:step="propose_cons_entry">
<bpmn:documentation>By: Group accountant. From none to proposed. When: balanced in group currency; every line names a company in scope; the period not signed. Effect: proposer recorded (email and sub); document type and period-specific flag recorded.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cons_journal_none__if__Task_propose_cons_entry</bpmn:incoming>
<bpmn:outgoing>Flow_Task_propose_cons_entry__Gateway_cons_journal_proposed__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_approve_cons_entry" name="Approve the entry" dodil:step="approve_cons_entry" dodil:approval="true">
<bpmn:documentation>By: Group finance controller. From proposed to posted. When: the approver is not the proposer (email AND sub) where signoff_second_person is on; the period not signed. Effect: numbered; a period-specific entry's reversal due at the next period's start. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cons_journal_proposed__if__Task_approve_cons_entry</bpmn:incoming>
<bpmn:outgoing>Flow_Task_approve_cons_entry__Task_reverse_cons_entry</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_reject_cons_entry" name="Reject the entry" dodil:step="reject_cons_entry">
<bpmn:documentation>By: Group finance controller. From proposed to rejected. Requires: reason.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_cons_journal_proposed__if__Task_reject_cons_entry</bpmn:incoming>
<bpmn:outgoing>Flow_Task_reject_cons_entry__End_cons_journal_rejected</bpmn:outgoing>
</bpmn:userTask>
<bpmn:task id="Task_reverse_cons_entry" name="Reverse the entry" dodil:step="reverse_cons_entry">
<bpmn:documentation>By: Group accountant or The system. From posted to reversed. When: the period not signed. Requires: reason. Effect: a mirror entry keyed derived_id(cons_journal_id, 'reversal'); neither deleted.</bpmn:documentation>
<bpmn:incoming>Flow_Task_post_cons_auto_entry__Task_reverse_cons_entry</bpmn:incoming>
<bpmn:incoming>Flow_Task_approve_cons_entry__Task_reverse_cons_entry</bpmn:incoming>
<bpmn:outgoing>Flow_Task_reverse_cons_entry__End_cons_journal_reversed</bpmn:outgoing>
</bpmn:task>
<bpmn:exclusiveGateway id="Gateway_cons_journal_none__if" name="New cons journal?">
<bpmn:incoming>Flow_Start_cons_journal__Gateway_cons_journal_none__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_cons_journal_none__if__Task_post_cons_auto_entry</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_cons_journal_none__if__Task_propose_cons_entry</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_cons_journal_proposed__if" name="Cons journal proposed: what next?">
<bpmn:incoming>Flow_Task_propose_cons_entry__Gateway_cons_journal_proposed__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_cons_journal_proposed__if__Task_approve_cons_entry</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_cons_journal_proposed__if__Task_reject_cons_entry</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_cons_journal_rejected" name="Cons journal rejected">
<bpmn:incoming>Flow_Task_reject_cons_entry__End_cons_journal_rejected</bpmn:incoming>
</bpmn:endEvent>
<bpmn:endEvent id="End_cons_journal_reversed" name="Cons journal reversed">
<bpmn:incoming>Flow_Task_reverse_cons_entry__End_cons_journal_reversed</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Gateway_cons_journal_none__if__Task_post_cons_auto_entry" sourceRef="Gateway_cons_journal_none__if" targetRef="Task_post_cons_auto_entry" />
<bpmn:sequenceFlow id="Flow_Gateway_cons_journal_none__if__Task_propose_cons_entry" sourceRef="Gateway_cons_journal_none__if" targetRef="Task_propose_cons_entry" />
<bpmn:sequenceFlow id="Flow_Start_cons_journal__Gateway_cons_journal_none__if" sourceRef="Start_cons_journal" targetRef="Gateway_cons_journal_none__if" />
<bpmn:sequenceFlow id="Flow_Task_post_cons_auto_entry__Task_reverse_cons_entry" sourceRef="Task_post_cons_auto_entry" targetRef="Task_reverse_cons_entry" />
<bpmn:sequenceFlow id="Flow_Gateway_cons_journal_proposed__if__Task_approve_cons_entry" sourceRef="Gateway_cons_journal_proposed__if" targetRef="Task_approve_cons_entry" />
<bpmn:sequenceFlow id="Flow_Gateway_cons_journal_proposed__if__Task_reject_cons_entry" sourceRef="Gateway_cons_journal_proposed__if" targetRef="Task_reject_cons_entry" />
<bpmn:sequenceFlow id="Flow_Task_propose_cons_entry__Gateway_cons_journal_proposed__if" sourceRef="Task_propose_cons_entry" targetRef="Gateway_cons_journal_proposed__if" />
<bpmn:sequenceFlow id="Flow_Task_approve_cons_entry__Task_reverse_cons_entry" sourceRef="Task_approve_cons_entry" targetRef="Task_reverse_cons_entry" />
<bpmn:sequenceFlow id="Flow_Task_reject_cons_entry__End_cons_journal_rejected" sourceRef="Task_reject_cons_entry" targetRef="End_cons_journal_rejected" />
<bpmn:sequenceFlow id="Flow_Task_reverse_cons_entry__End_cons_journal_reversed" sourceRef="Task_reverse_cons_entry" targetRef="End_cons_journal_reversed" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_consolidation_v1">
<bpmndi:BPMNPlane id="BPMNPlane_consolidation_v1" bpmnElement="Collaboration_consolidation_v1">
<bpmndi:BPMNShape id="Participant_consolidation_cons_journal_di" bpmnElement="Participant_consolidation_cons_journal" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1130" height="540" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_cons_journal_system_di" bpmnElement="Lane_cons_journal_system" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1100" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_cons_journal_group_accountant_di" bpmnElement="Lane_cons_journal_group_accountant" isHorizontal="true">
<dc:Bounds x="30" y="140" width="1100" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_cons_journal_group_controller_di" bpmnElement="Lane_cons_journal_group_controller" isHorizontal="true">
<dc:Bounds x="30" y="280" width="1100" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_cons_journal_di" bpmnElement="Start_cons_journal">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_post_cons_auto_entry_di" bpmnElement="Task_post_cons_auto_entry">
<dc:Bounds x="465" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_propose_cons_entry_di" bpmnElement="Task_propose_cons_entry">
<dc:Bounds x="465" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_approve_cons_entry_di" bpmnElement="Task_approve_cons_entry">
<dc:Bounds x="805" y="300" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_reject_cons_entry_di" bpmnElement="Task_reject_cons_entry">
<dc:Bounds x="805" y="420" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_reverse_cons_entry_di" bpmnElement="Task_reverse_cons_entry">
<dc:Bounds x="635" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_cons_journal_none__if_di" bpmnElement="Gateway_cons_journal_none__if">
<dc:Bounds x="320" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_cons_journal_proposed__if_di" bpmnElement="Gateway_cons_journal_proposed__if">
<dc:Bounds x="660" y="315" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_cons_journal_rejected_di" bpmnElement="End_cons_journal_rejected">
<dc:Bounds x="1007" y="322" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_cons_journal_reversed_di" bpmnElement="End_cons_journal_reversed">
<dc:Bounds x="837" y="182" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Gateway_cons_journal_none__if__Task_post_cons_auto_entry_di" bpmnElement="Flow_Gateway_cons_journal_none__if__Task_post_cons_auto_entry">
<di:waypoint x="370" y="60" />
<di:waypoint x="465" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_cons_journal_none__if__Task_propose_cons_entry_di" bpmnElement="Flow_Gateway_cons_journal_none__if__Task_propose_cons_entry">
<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_cons_journal__Gateway_cons_journal_none__if_di" bpmnElement="Flow_Start_cons_journal__Gateway_cons_journal_none__if">
<di:waypoint x="193" y="60" />
<di:waypoint x="320" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_post_cons_auto_entry__Task_reverse_cons_entry_di" bpmnElement="Flow_Task_post_cons_auto_entry__Task_reverse_cons_entry">
<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_Gateway_cons_journal_proposed__if__Task_approve_cons_entry_di" bpmnElement="Flow_Gateway_cons_journal_proposed__if__Task_approve_cons_entry">
<di:waypoint x="710" y="340" />
<di:waypoint x="805" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_cons_journal_proposed__if__Task_reject_cons_entry_di" bpmnElement="Flow_Gateway_cons_journal_proposed__if__Task_reject_cons_entry">
<di:waypoint x="710" y="340" />
<di:waypoint x="780" y="340" />
<di:waypoint x="780" y="460" />
<di:waypoint x="805" y="460" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_propose_cons_entry__Gateway_cons_journal_proposed__if_di" bpmnElement="Flow_Task_propose_cons_entry__Gateway_cons_journal_proposed__if">
<di:waypoint x="565" y="200" />
<di:waypoint x="635" y="200" />
<di:waypoint x="635" y="340" />
<di:waypoint x="660" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_approve_cons_entry__Task_reverse_cons_entry_di" bpmnElement="Flow_Task_approve_cons_entry__Task_reverse_cons_entry">
<di:waypoint x="855" y="380" />
<di:waypoint x="855" y="395" />
<di:waypoint x="685" y="395" />
<di:waypoint x="685" y="240" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_reject_cons_entry__End_cons_journal_rejected_di" bpmnElement="Flow_Task_reject_cons_entry__End_cons_journal_rejected">
<di:waypoint x="905" y="460" />
<di:waypoint x="982" y="460" />
<di:waypoint x="982" y="340" />
<di:waypoint x="1007" y="340" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_reverse_cons_entry__End_cons_journal_reversed_di" bpmnElement="Flow_Task_reverse_cons_entry__End_cons_journal_reversed">
<di:waypoint x="735" y="200" />
<di:waypoint x="837" y="200" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>