dodil/erp-method
modules/payments/signoff/payments/history/payments_statement_line.v2.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_payments_v4" name="Payments & collections processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_payments_v4">
<bpmn:documentation>Payments & collections: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_payments_statement_line" name="Statement line" processRef="Process_payments_statement_line_v4" />
</bpmn:collaboration>
<bpmn:process id="Process_payments_statement_line_v4" name="Statement line" isExecutable="false">
<bpmn:documentation>Lifecycle of the statement line, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: open, matched, posted.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_statement_line">
<bpmn:lane id="Lane_statement_line_system" name="The system">
<bpmn:flowNodeRef>Start_statement_line</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_suggest_statement_match</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_apply_reconciliation_rule</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_suggest_statement_match__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_suggest_statement_match__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_statement_line_open__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_apply_reconciliation_rule__if</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_statement_line_cashier" name="Whoever records money (bookkeeper, office manager)">
<bpmn:flowNodeRef>Task_match_statement_line</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_post_statement_line</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_unmatch_statement_line</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_statement_line" name="Statement line open">
<bpmn:outgoing>Flow_Start_statement_line__Gateway_suggest_statement_match__if</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:serviceTask id="Task_suggest_statement_match" name="AI suggests a match or an account (suggest)" dodil:step="suggest_statement_match" implementation="##unspecified">
<bpmn:documentation>By: The system. From open to open. When: the line is open and the step is on. Effect: a suggestion row with evidence and confidence; nothing posted (PAY-22).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_suggest_statement_match__if__Task_suggest_statement_match</bpmn:incoming>
<bpmn:outgoing>Flow_Task_suggest_statement_match__Gateway_suggest_statement_match__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_apply_reconciliation_rule" name="Apply the rule that names the line" dodil:step="apply_reconciliation_rule" implementation="##unspecified">
<bpmn:documentation>By: The system. From open to open / posted. When: exactly one rule matches; in suggest mode it proposes, in auto mode (owner's control) it posts and lists the line for review. Effect: decided_how rule or auto (PAY-23).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_statement_line_open__if__Task_apply_reconciliation_rule</bpmn:incoming>
<bpmn:outgoing>Flow_Task_apply_reconciliation_rule__Gateway_apply_reconciliation_rule__if</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_match_statement_line" name="Match to a receipt, supplier payment, transfer, refund, deposit batch, cash deposit, direct-debit run or HMRC payment" dodil:step="match_statement_line">
<bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From open to matched. When: the same amount and currency; the counterpart is not matched to another line. Effect: the counterpart confirmed (purchasing PAY-48, tax's liability), the transfer clearing posted on each side (PAY-21, PAY-25, PAY-28).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_statement_line_open__if__Task_match_statement_line</bpmn:incoming>
<bpmn:outgoing>Flow_Task_match_statement_line__Task_unmatch_statement_line</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_post_statement_line" name="Post the line to an account" dodil:step="post_statement_line">
<bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From open to posted. When: an account and a tax code; VAT reclaimable only with a receipt image. Requires: account. Effect: a journal dated by the bank, keyed on the line (PAY-24).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_statement_line_open__if__Task_post_statement_line</bpmn:incoming>
<bpmn:outgoing>Flow_Task_post_statement_line__Task_unmatch_statement_line</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_unmatch_statement_line" name="Undo a match or a posting" dodil:step="unmatch_statement_line">
<bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From matched / posted to open. When: its statement is not reconciled. Requires: reason. Effect: a reversing journal for a posting; the counterpart released.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_apply_reconciliation_rule__if__Task_unmatch_statement_line</bpmn:incoming>
<bpmn:incoming>Flow_Task_match_statement_line__Task_unmatch_statement_line</bpmn:incoming>
<bpmn:incoming>Flow_Task_post_statement_line__Task_unmatch_statement_line</bpmn:incoming>
<bpmn:outgoing>Flow_Task_unmatch_statement_line__Gateway_suggest_statement_match__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_suggest_statement_match__if" name="the line is open and the step is on?">
<bpmn:incoming>Flow_Start_statement_line__Gateway_suggest_statement_match__if</bpmn:incoming>
<bpmn:incoming>Flow_Gateway_apply_reconciliation_rule__if__Gateway_suggest_statement_match__if</bpmn:incoming>
<bpmn:incoming>Flow_Task_unmatch_statement_line__Gateway_suggest_statement_match__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_suggest_statement_match__if__Task_suggest_statement_match</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_suggest_statement_match__if__Gateway_suggest_statement_match__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_suggest_statement_match__if_end">
<bpmn:incoming>Flow_Gateway_suggest_statement_match__if__Gateway_suggest_statement_match__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_suggest_statement_match__Gateway_suggest_statement_match__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_suggest_statement_match__if_end__Gateway_statement_line_open__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_statement_line_open__if" name="Statement line open: what next?">
<bpmn:incoming>Flow_Gateway_suggest_statement_match__if_end__Gateway_statement_line_open__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_statement_line_open__if__Task_apply_reconciliation_rule</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_statement_line_open__if__Task_match_statement_line</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_statement_line_open__if__Task_post_statement_line</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_apply_reconciliation_rule__if" name="Outcome?">
<bpmn:incoming>Flow_Task_apply_reconciliation_rule__Gateway_apply_reconciliation_rule__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_apply_reconciliation_rule__if__Gateway_suggest_statement_match__if</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_apply_reconciliation_rule__if__Task_unmatch_statement_line</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="Flow_Gateway_suggest_statement_match__if__Task_suggest_statement_match" name="the line is open and the step is on" sourceRef="Gateway_suggest_statement_match__if" targetRef="Task_suggest_statement_match" />
<bpmn:sequenceFlow id="Flow_Gateway_suggest_statement_match__if__Gateway_suggest_statement_match__if_end" name="otherwise" sourceRef="Gateway_suggest_statement_match__if" targetRef="Gateway_suggest_statement_match__if_end" />
<bpmn:sequenceFlow id="Flow_Task_suggest_statement_match__Gateway_suggest_statement_match__if_end" sourceRef="Task_suggest_statement_match" targetRef="Gateway_suggest_statement_match__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_statement_line_open__if__Task_apply_reconciliation_rule" sourceRef="Gateway_statement_line_open__if" targetRef="Task_apply_reconciliation_rule" />
<bpmn:sequenceFlow id="Flow_Gateway_statement_line_open__if__Task_match_statement_line" sourceRef="Gateway_statement_line_open__if" targetRef="Task_match_statement_line" />
<bpmn:sequenceFlow id="Flow_Gateway_statement_line_open__if__Task_post_statement_line" sourceRef="Gateway_statement_line_open__if" targetRef="Task_post_statement_line" />
<bpmn:sequenceFlow id="Flow_Gateway_suggest_statement_match__if_end__Gateway_statement_line_open__if" sourceRef="Gateway_suggest_statement_match__if_end" targetRef="Gateway_statement_line_open__if" />
<bpmn:sequenceFlow id="Flow_Start_statement_line__Gateway_suggest_statement_match__if" sourceRef="Start_statement_line" targetRef="Gateway_suggest_statement_match__if" />
<bpmn:sequenceFlow id="Flow_Task_apply_reconciliation_rule__Gateway_apply_reconciliation_rule__if" sourceRef="Task_apply_reconciliation_rule" targetRef="Gateway_apply_reconciliation_rule__if" />
<bpmn:sequenceFlow id="Flow_Gateway_apply_reconciliation_rule__if__Gateway_suggest_statement_match__if" name="open" sourceRef="Gateway_apply_reconciliation_rule__if" targetRef="Gateway_suggest_statement_match__if" />
<bpmn:sequenceFlow id="Flow_Gateway_apply_reconciliation_rule__if__Task_unmatch_statement_line" name="posted" sourceRef="Gateway_apply_reconciliation_rule__if" targetRef="Task_unmatch_statement_line" />
<bpmn:sequenceFlow id="Flow_Task_match_statement_line__Task_unmatch_statement_line" sourceRef="Task_match_statement_line" targetRef="Task_unmatch_statement_line" />
<bpmn:sequenceFlow id="Flow_Task_post_statement_line__Task_unmatch_statement_line" sourceRef="Task_post_statement_line" targetRef="Task_unmatch_statement_line" />
<bpmn:sequenceFlow id="Flow_Task_unmatch_statement_line__Gateway_suggest_statement_match__if" sourceRef="Task_unmatch_statement_line" targetRef="Gateway_suggest_statement_match__if" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_payments_v4">
<bpmndi:BPMNPlane id="BPMNPlane_payments_v4" bpmnElement="Collaboration_payments_v4">
<bpmndi:BPMNShape id="Participant_payments_statement_line_di" bpmnElement="Participant_payments_statement_line" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1130" height="520" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_statement_line_system_di" bpmnElement="Lane_statement_line_system" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1100" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_statement_line_cashier_di" bpmnElement="Lane_statement_line_cashier" isHorizontal="true">
<dc:Bounds x="30" y="260" width="1100" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_statement_line_di" bpmnElement="Start_statement_line">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_suggest_statement_match_di" bpmnElement="Task_suggest_statement_match">
<dc:Bounds x="465" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_apply_reconciliation_rule_di" bpmnElement="Task_apply_reconciliation_rule">
<dc:Bounds x="805" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_match_statement_line_di" bpmnElement="Task_match_statement_line">
<dc:Bounds x="805" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_post_statement_line_di" bpmnElement="Task_post_statement_line">
<dc:Bounds x="805" y="400" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_unmatch_statement_line_di" bpmnElement="Task_unmatch_statement_line">
<dc:Bounds x="975" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_suggest_statement_match__if_di" bpmnElement="Gateway_suggest_statement_match__if">
<dc:Bounds x="320" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_suggest_statement_match__if_end_di" bpmnElement="Gateway_suggest_statement_match__if_end">
<dc:Bounds x="490" y="155" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_statement_line_open__if_di" bpmnElement="Gateway_statement_line_open__if">
<dc:Bounds x="660" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_apply_reconciliation_rule__if_di" bpmnElement="Gateway_apply_reconciliation_rule__if">
<dc:Bounds x="1000" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Gateway_suggest_statement_match__if__Task_suggest_statement_match_di" bpmnElement="Flow_Gateway_suggest_statement_match__if__Task_suggest_statement_match">
<di:waypoint x="370" y="60" />
<di:waypoint x="465" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_suggest_statement_match__if__Gateway_suggest_statement_match__if_end_di" bpmnElement="Flow_Gateway_suggest_statement_match__if__Gateway_suggest_statement_match__if_end">
<di:waypoint x="370" y="60" />
<di:waypoint x="465" y="60" />
<di:waypoint x="465" y="180" />
<di:waypoint x="490" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_suggest_statement_match__Gateway_suggest_statement_match__if_end_di" bpmnElement="Flow_Task_suggest_statement_match__Gateway_suggest_statement_match__if_end">
<di:waypoint x="515" y="100" />
<di:waypoint x="515" y="220" />
<di:waypoint x="515" y="220" />
<di:waypoint x="515" y="205" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_statement_line_open__if__Task_apply_reconciliation_rule_di" bpmnElement="Flow_Gateway_statement_line_open__if__Task_apply_reconciliation_rule">
<di:waypoint x="710" y="60" />
<di:waypoint x="805" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_statement_line_open__if__Task_match_statement_line_di" bpmnElement="Flow_Gateway_statement_line_open__if__Task_match_statement_line">
<di:waypoint x="710" y="60" />
<di:waypoint x="780" y="60" />
<di:waypoint x="780" y="320" />
<di:waypoint x="805" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_statement_line_open__if__Task_post_statement_line_di" bpmnElement="Flow_Gateway_statement_line_open__if__Task_post_statement_line">
<di:waypoint x="710" y="60" />
<di:waypoint x="780" y="60" />
<di:waypoint x="780" y="440" />
<di:waypoint x="805" y="440" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_suggest_statement_match__if_end__Gateway_statement_line_open__if_di" bpmnElement="Flow_Gateway_suggest_statement_match__if_end__Gateway_statement_line_open__if">
<di:waypoint x="540" y="180" />
<di:waypoint x="635" y="180" />
<di:waypoint x="635" y="60" />
<di:waypoint x="660" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Start_statement_line__Gateway_suggest_statement_match__if_di" bpmnElement="Flow_Start_statement_line__Gateway_suggest_statement_match__if">
<di:waypoint x="193" y="60" />
<di:waypoint x="320" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_apply_reconciliation_rule__Gateway_apply_reconciliation_rule__if_di" bpmnElement="Flow_Task_apply_reconciliation_rule__Gateway_apply_reconciliation_rule__if">
<di:waypoint x="905" y="60" />
<di:waypoint x="1000" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_apply_reconciliation_rule__if__Gateway_suggest_statement_match__if_di" bpmnElement="Flow_Gateway_apply_reconciliation_rule__if__Gateway_suggest_statement_match__if">
<di:waypoint x="1025" y="85" />
<di:waypoint x="1025" y="106" />
<di:waypoint x="345" y="106" />
<di:waypoint x="345" y="85" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_apply_reconciliation_rule__if__Task_unmatch_statement_line_di" bpmnElement="Flow_Gateway_apply_reconciliation_rule__if__Task_unmatch_statement_line">
<di:waypoint x="1025" y="85" />
<di:waypoint x="1025" y="387" />
<di:waypoint x="1025" y="387" />
<di:waypoint x="1025" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_match_statement_line__Task_unmatch_statement_line_di" bpmnElement="Flow_Task_match_statement_line__Task_unmatch_statement_line">
<di:waypoint x="905" y="320" />
<di:waypoint x="975" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_post_statement_line__Task_unmatch_statement_line_di" bpmnElement="Flow_Task_post_statement_line__Task_unmatch_statement_line">
<di:waypoint x="905" y="440" />
<di:waypoint x="950" y="440" />
<di:waypoint x="950" y="320" />
<di:waypoint x="975" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_unmatch_statement_line__Gateway_suggest_statement_match__if_di" bpmnElement="Flow_Task_unmatch_statement_line__Gateway_suggest_statement_match__if">
<di:waypoint x="1025" y="360" />
<di:waypoint x="1025" y="393" />
<di:waypoint x="345" y="393" />
<di:waypoint x="345" y="85" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>