dodil/erp-method

modules/ar/signoff/ar/history/ar_payment_request.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_ar_v5" name="Invoicing processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_ar_v5">
  <bpmn:documentation>Invoicing: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_ar_payment_request" name="Payment request" processRef="Process_ar_payment_request_v5" />
 </bpmn:collaboration>
 <bpmn:process id="Process_ar_payment_request_v5" name="Payment request" isExecutable="false">
  <bpmn:documentation>Lifecycle of the payment request, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, issued, settled, cancelled.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_payment_request">
   <bpmn:lane id="Lane_payment_request_biller" name="Whoever sends the invoices (office, bookkeeper)">
    <bpmn:flowNodeRef>Start_payment_request</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_raise_payment_request</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_issue_payment_request</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_cancel_payment_request</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_payment_request_draft__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_payment_request_cancelled</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_payment_request_system" name="The system">
    <bpmn:flowNodeRef>Task_settle_payment_request</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_payment_request_issued__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_settle_payment_request__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_payment_request_settled</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_payment_request" name="Payment request needed">
   <bpmn:outgoing>Flow_Start_payment_request__Task_raise_payment_request</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_raise_payment_request" name="Ask for a down payment, or raise a pro forma (v4)" dodil:step="raise_payment_request">
   <bpmn:documentation>By: Whoever sends the invoices (office, bookkeeper). From none to draft. When: deposit_mode request, or a pro forma asked; the amount within the order total less deposits already asked (sales-order SO-09). Effect: keyed dpr:&lt;sales_order_id&gt;:&lt;request_no&gt; from an order, a uuid by hand; amounts computed by tax for display only (AR-35).</bpmn:documentation>
   <bpmn:incoming>Flow_Start_payment_request__Task_raise_payment_request</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_raise_payment_request__Gateway_payment_request_draft__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_issue_payment_request" name="Issue the payment request" dodil:step="issue_payment_request">
   <bpmn:documentation>By: Whoever sends the invoices (office, bookkeeper). From draft to issued. When: a billing profile in force today. Effect: numbered DPR-; titled not a VAT invoice; nothing posted, nothing in a VAT return.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_payment_request_draft__if__Task_issue_payment_request</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_issue_payment_request__Gateway_payment_request_issued__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_settle_payment_request" name="Settle the request from the receipt that paid it" dodil:step="settle_payment_request" implementation="##unspecified">
   <bpmn:documentation>By: The system. From issued to issued / settled. When: payments names a receipt and its amount, at most what remains of the request. Effect: a deposit invoice for the amount received, tax point the received date (AR-36); settled when nothing remains.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_payment_request_issued__if__Task_settle_payment_request</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_settle_payment_request__Gateway_settle_payment_request__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_cancel_payment_request" name="Cancel the payment request" dodil:step="cancel_payment_request">
   <bpmn:documentation>By: Whoever sends the invoices (office, bookkeeper). From draft / issued to cancelled. When: nothing received against it. Requires: reason.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_payment_request_draft__if__Task_cancel_payment_request</bpmn:incoming>
   <bpmn:incoming>Flow_Gateway_payment_request_issued__if__Task_cancel_payment_request</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_cancel_payment_request__End_payment_request_cancelled</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_payment_request_draft__if" name="Payment request draft: what next?">
   <bpmn:incoming>Flow_Task_raise_payment_request__Gateway_payment_request_draft__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_payment_request_draft__if__Task_issue_payment_request</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_payment_request_draft__if__Task_cancel_payment_request</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_payment_request_issued__if" name="Payment request issued: what next?">
   <bpmn:incoming>Flow_Task_issue_payment_request__Gateway_payment_request_issued__if</bpmn:incoming>
   <bpmn:incoming>Flow_Gateway_settle_payment_request__if__Gateway_payment_request_issued__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_payment_request_issued__if__Task_settle_payment_request</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_payment_request_issued__if__Task_cancel_payment_request</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_settle_payment_request__if" name="Outcome?">
   <bpmn:incoming>Flow_Task_settle_payment_request__Gateway_settle_payment_request__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_settle_payment_request__if__Gateway_payment_request_issued__if</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_settle_payment_request__if__End_payment_request_settled</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_payment_request_settled" name="Payment request settled">
   <bpmn:incoming>Flow_Gateway_settle_payment_request__if__End_payment_request_settled</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_payment_request_cancelled" name="Payment request cancelled">
   <bpmn:incoming>Flow_Task_cancel_payment_request__End_payment_request_cancelled</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_payment_request__Task_raise_payment_request" sourceRef="Start_payment_request" targetRef="Task_raise_payment_request" />
  <bpmn:sequenceFlow id="Flow_Gateway_payment_request_draft__if__Task_issue_payment_request" sourceRef="Gateway_payment_request_draft__if" targetRef="Task_issue_payment_request" />
  <bpmn:sequenceFlow id="Flow_Gateway_payment_request_draft__if__Task_cancel_payment_request" sourceRef="Gateway_payment_request_draft__if" targetRef="Task_cancel_payment_request" />
  <bpmn:sequenceFlow id="Flow_Task_raise_payment_request__Gateway_payment_request_draft__if" sourceRef="Task_raise_payment_request" targetRef="Gateway_payment_request_draft__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_payment_request_issued__if__Task_settle_payment_request" sourceRef="Gateway_payment_request_issued__if" targetRef="Task_settle_payment_request" />
  <bpmn:sequenceFlow id="Flow_Gateway_payment_request_issued__if__Task_cancel_payment_request" sourceRef="Gateway_payment_request_issued__if" targetRef="Task_cancel_payment_request" />
  <bpmn:sequenceFlow id="Flow_Task_issue_payment_request__Gateway_payment_request_issued__if" sourceRef="Task_issue_payment_request" targetRef="Gateway_payment_request_issued__if" />
  <bpmn:sequenceFlow id="Flow_Task_settle_payment_request__Gateway_settle_payment_request__if" sourceRef="Task_settle_payment_request" targetRef="Gateway_settle_payment_request__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_settle_payment_request__if__Gateway_payment_request_issued__if" name="issued" sourceRef="Gateway_settle_payment_request__if" targetRef="Gateway_payment_request_issued__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_settle_payment_request__if__End_payment_request_settled" name="settled" sourceRef="Gateway_settle_payment_request__if" targetRef="End_payment_request_settled" />
  <bpmn:sequenceFlow id="Flow_Task_cancel_payment_request__End_payment_request_cancelled" sourceRef="Task_cancel_payment_request" targetRef="End_payment_request_cancelled" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_ar_v5">
  <bpmndi:BPMNPlane id="BPMNPlane_ar_v5" bpmnElement="Collaboration_ar_v5">
   <bpmndi:BPMNShape id="Participant_ar_payment_request_di" bpmnElement="Participant_ar_payment_request" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1470" height="400" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_payment_request_biller_di" bpmnElement="Lane_payment_request_biller" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1440" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_payment_request_system_di" bpmnElement="Lane_payment_request_system" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1440" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_payment_request_di" bpmnElement="Start_payment_request">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_raise_payment_request_di" bpmnElement="Task_raise_payment_request">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_issue_payment_request_di" bpmnElement="Task_issue_payment_request">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_settle_payment_request_di" bpmnElement="Task_settle_payment_request">
    <dc:Bounds x="975" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_cancel_payment_request_di" bpmnElement="Task_cancel_payment_request">
    <dc:Bounds x="635" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_payment_request_draft__if_di" bpmnElement="Gateway_payment_request_draft__if">
    <dc:Bounds x="490" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_payment_request_issued__if_di" bpmnElement="Gateway_payment_request_issued__if">
    <dc:Bounds x="830" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_settle_payment_request__if_di" bpmnElement="Gateway_settle_payment_request__if">
    <dc:Bounds x="1170" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_payment_request_settled_di" bpmnElement="End_payment_request_settled">
    <dc:Bounds x="1347" y="302" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_payment_request_cancelled_di" bpmnElement="End_payment_request_cancelled">
    <dc:Bounds x="837" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_payment_request__Task_raise_payment_request_di" bpmnElement="Flow_Start_payment_request__Task_raise_payment_request">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_payment_request_draft__if__Task_issue_payment_request_di" bpmnElement="Flow_Gateway_payment_request_draft__if__Task_issue_payment_request">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_payment_request_draft__if__Task_cancel_payment_request_di" bpmnElement="Flow_Gateway_payment_request_draft__if__Task_cancel_payment_request">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="610" y="60" />
    <di:waypoint x="610" y="180" />
    <di:waypoint x="635" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_raise_payment_request__Gateway_payment_request_draft__if_di" bpmnElement="Flow_Task_raise_payment_request__Gateway_payment_request_draft__if">
    <di:waypoint x="395" y="60" />
    <di:waypoint x="490" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_payment_request_issued__if__Task_settle_payment_request_di" bpmnElement="Flow_Gateway_payment_request_issued__if__Task_settle_payment_request">
    <di:waypoint x="880" y="320" />
    <di:waypoint x="975" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_payment_request_issued__if__Task_cancel_payment_request_di" bpmnElement="Flow_Gateway_payment_request_issued__if__Task_cancel_payment_request">
    <di:waypoint x="855" y="345" />
    <di:waypoint x="855" y="360" />
    <di:waypoint x="685" y="360" />
    <di:waypoint x="685" y="220" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_issue_payment_request__Gateway_payment_request_issued__if_di" bpmnElement="Flow_Task_issue_payment_request__Gateway_payment_request_issued__if">
    <di:waypoint x="735" y="60" />
    <di:waypoint x="805" y="60" />
    <di:waypoint x="805" y="320" />
    <di:waypoint x="830" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_settle_payment_request__Gateway_settle_payment_request__if_di" bpmnElement="Flow_Task_settle_payment_request__Gateway_settle_payment_request__if">
    <di:waypoint x="1075" y="320" />
    <di:waypoint x="1170" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_settle_payment_request__if__Gateway_payment_request_issued__if_di" bpmnElement="Flow_Gateway_settle_payment_request__if__Gateway_payment_request_issued__if">
    <di:waypoint x="1195" y="345" />
    <di:waypoint x="1195" y="366" />
    <di:waypoint x="855" y="366" />
    <di:waypoint x="855" y="345" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_settle_payment_request__if__End_payment_request_settled_di" bpmnElement="Flow_Gateway_settle_payment_request__if__End_payment_request_settled">
    <di:waypoint x="1220" y="320" />
    <di:waypoint x="1347" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_cancel_payment_request__End_payment_request_cancelled_di" bpmnElement="Flow_Task_cancel_payment_request__End_payment_request_cancelled">
    <di:waypoint x="735" y="180" />
    <di:waypoint x="812" y="180" />
    <di:waypoint x="812" y="60" />
    <di:waypoint x="837" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>