dodil/erp-method

modules/payments/signoff/payments/history/payments_refund.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_v2" name="Payments &amp; collections processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_payments_v2">
  <bpmn:documentation>Payments &amp; collections: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_payments_refund" name="Refund" processRef="Process_payments_refund_v2" />
 </bpmn:collaboration>
 <bpmn:process id="Process_payments_refund_v2" name="Refund" isExecutable="false">
  <bpmn:documentation>Lifecycle of the refund, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: requested, approved, rejected, paid.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_refund">
   <bpmn:lane id="Lane_refund_cashier" name="Whoever records money (bookkeeper, office manager)">
    <bpmn:flowNodeRef>Start_refund</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_request_refund</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_pay_refund</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_refund_paid</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_refund_approver" name="Owner / finance manager">
    <bpmn:flowNodeRef>Task_approve_refund</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_reject_refund</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_refund_requested__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_refund_rejected</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_refund" name="Refund needed">
   <bpmn:outgoing>Flow_Start_refund__Task_request_refund</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_request_refund" name="Request a refund" dodil:step="request_refund">
   <bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From none to requested. When: the customer has unallocated credit at least the amount, in the refund's currency.</bpmn:documentation>
   <bpmn:incoming>Flow_Start_refund__Task_request_refund</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_request_refund__Gateway_refund_requested__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_approve_refund" name="Approve the refund" dodil:step="approve_refund" dodil:approval="true">
   <bpmn:documentation>By: Owner / finance manager. From requested to approved. When: the approver is not the requester; the credit is still at least the amount. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_refund_requested__if__Task_approve_refund</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_approve_refund__Task_pay_refund</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_reject_refund" name="Reject the refund" dodil:step="reject_refund">
   <bpmn:documentation>By: Owner / finance manager. From requested to rejected. Requires: reason.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_refund_requested__if__Task_reject_refund</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_reject_refund__End_refund_rejected</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_pay_refund" name="Record the refund paid" dodil:step="pay_refund">
   <bpmn:documentation>By: Whoever records money (bookkeeper, office manager). From approved to paid. When: paid_on today or earlier and not before the approval. Requires: bank_ref. Effect: allocated against the credit; posted in the ledger.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_approve_refund__Task_pay_refund</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_pay_refund__End_refund_paid</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_refund_requested__if" name="Refund requested: what next?">
   <bpmn:incoming>Flow_Task_request_refund__Gateway_refund_requested__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_refund_requested__if__Task_approve_refund</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_refund_requested__if__Task_reject_refund</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_refund_rejected" name="Refund rejected">
   <bpmn:incoming>Flow_Task_reject_refund__End_refund_rejected</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_refund_paid" name="Refund paid">
   <bpmn:incoming>Flow_Task_pay_refund__End_refund_paid</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_refund__Task_request_refund" sourceRef="Start_refund" targetRef="Task_request_refund" />
  <bpmn:sequenceFlow id="Flow_Gateway_refund_requested__if__Task_approve_refund" sourceRef="Gateway_refund_requested__if" targetRef="Task_approve_refund" />
  <bpmn:sequenceFlow id="Flow_Gateway_refund_requested__if__Task_reject_refund" sourceRef="Gateway_refund_requested__if" targetRef="Task_reject_refund" />
  <bpmn:sequenceFlow id="Flow_Task_request_refund__Gateway_refund_requested__if" sourceRef="Task_request_refund" targetRef="Gateway_refund_requested__if" />
  <bpmn:sequenceFlow id="Flow_Task_approve_refund__Task_pay_refund" sourceRef="Task_approve_refund" targetRef="Task_pay_refund" />
  <bpmn:sequenceFlow id="Flow_Task_reject_refund__End_refund_rejected" sourceRef="Task_reject_refund" targetRef="End_refund_rejected" />
  <bpmn:sequenceFlow id="Flow_Task_pay_refund__End_refund_paid" sourceRef="Task_pay_refund" targetRef="End_refund_paid" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_payments_v2">
  <bpmndi:BPMNPlane id="BPMNPlane_payments_v2" bpmnElement="Collaboration_payments_v2">
   <bpmndi:BPMNShape id="Participant_payments_refund_di" bpmnElement="Participant_payments_refund" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1130" height="400" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_refund_cashier_di" bpmnElement="Lane_refund_cashier" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1100" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_refund_approver_di" bpmnElement="Lane_refund_approver" isHorizontal="true">
    <dc:Bounds x="30" y="140" width="1100" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_refund_di" bpmnElement="Start_refund">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_request_refund_di" bpmnElement="Task_request_refund">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_approve_refund_di" bpmnElement="Task_approve_refund">
    <dc:Bounds x="635" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_reject_refund_di" bpmnElement="Task_reject_refund">
    <dc:Bounds x="635" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_pay_refund_di" bpmnElement="Task_pay_refund">
    <dc:Bounds x="805" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_refund_requested__if_di" bpmnElement="Gateway_refund_requested__if">
    <dc:Bounds x="490" y="175" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_refund_rejected_di" bpmnElement="End_refund_rejected">
    <dc:Bounds x="837" y="182" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_refund_paid_di" bpmnElement="End_refund_paid">
    <dc:Bounds x="1007" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_refund__Task_request_refund_di" bpmnElement="Flow_Start_refund__Task_request_refund">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_refund_requested__if__Task_approve_refund_di" bpmnElement="Flow_Gateway_refund_requested__if__Task_approve_refund">
    <di:waypoint x="540" y="200" />
    <di:waypoint x="635" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_refund_requested__if__Task_reject_refund_di" bpmnElement="Flow_Gateway_refund_requested__if__Task_reject_refund">
    <di:waypoint x="540" y="200" />
    <di:waypoint x="610" y="200" />
    <di:waypoint x="610" y="320" />
    <di:waypoint x="635" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_request_refund__Gateway_refund_requested__if_di" bpmnElement="Flow_Task_request_refund__Gateway_refund_requested__if">
    <di:waypoint x="395" y="60" />
    <di:waypoint x="465" y="60" />
    <di:waypoint x="465" y="200" />
    <di:waypoint x="490" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_approve_refund__Task_pay_refund_di" bpmnElement="Flow_Task_approve_refund__Task_pay_refund">
    <di:waypoint x="735" y="200" />
    <di:waypoint x="780" y="200" />
    <di:waypoint x="780" y="60" />
    <di:waypoint x="805" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_reject_refund__End_refund_rejected_di" bpmnElement="Flow_Task_reject_refund__End_refund_rejected">
    <di:waypoint x="735" y="320" />
    <di:waypoint x="812" y="320" />
    <di:waypoint x="812" y="200" />
    <di:waypoint x="837" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_pay_refund__End_refund_paid_di" bpmnElement="Flow_Task_pay_refund__End_refund_paid">
    <di:waypoint x="905" y="60" />
    <di:waypoint x="1007" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>