dodil/erp-method

modules/purchasing/signoff/purchasing/history/purchasing_self_billing_agreement.v5.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_purchasing_v8" name="Purchasing &amp; suppliers processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_purchasing_v8">
  <bpmn:documentation>Purchasing &amp; suppliers: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_purchasing_self_billing_agreement" name="Self billing agreement" processRef="Process_purchasing_self_billing_agreement_v8" />
 </bpmn:collaboration>
 <bpmn:process id="Process_purchasing_self_billing_agreement_v8" name="Self billing agreement" isExecutable="false">
  <bpmn:documentation>Lifecycle of the self billing agreement, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: proposed, active, ended, rejected.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_self_billing_agreement">
   <bpmn:lane id="Lane_self_billing_agreement_payables_clerk" name="accounts payable">
    <bpmn:flowNodeRef>Start_self_billing_agreement</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_propose_self_billing</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_end_self_billing</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_self_billing_agreement_active__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_self_billing_agreement_ended</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_self_billing_agreement_payables_approver" name="whoever releases money (finance manager)">
    <bpmn:flowNodeRef>Task_approve_self_billing</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_reject_self_billing</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_self_billing_agreement_proposed__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_self_billing_agreement_rejected</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_self_billing_agreement_system" name="The system">
    <bpmn:flowNodeRef>Task_expire_self_billing</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_self_billing_agreement" name="Self billing agreement needed">
   <bpmn:outgoing>Flow_Start_self_billing_agreement__Task_propose_self_billing</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_propose_self_billing" name="Record the self-billing agreement" dodil:step="propose_self_billing">
   <bpmn:documentation>By: accounts payable. From none to proposed. When: the signed agreement; an end date within the owner's maximum; the supplier's VAT number where they are registered. Effect: keyed (bp_id, valid_from); the PDF kept as an object.</bpmn:documentation>
   <bpmn:incoming>Flow_Start_self_billing_agreement__Task_propose_self_billing</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_propose_self_billing__Gateway_self_billing_agreement_proposed__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_approve_self_billing" name="Approve the agreement" dodil:step="approve_self_billing" dodil:approval="true">
   <bpmn:documentation>By: whoever releases money (finance manager). From proposed to active. When: the approver is not the person who recorded it (email AND sub). An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_self_billing_agreement_proposed__if__Task_approve_self_billing</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_approve_self_billing__Gateway_self_billing_agreement_active__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_reject_self_billing" name="Reject it" dodil:step="reject_self_billing">
   <bpmn:documentation>By: whoever releases money (finance manager). From proposed to rejected. Requires: reason.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_self_billing_agreement_proposed__if__Task_reject_self_billing</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_reject_self_billing__End_self_billing_agreement_rejected</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_end_self_billing" name="End it early" dodil:step="end_self_billing">
   <bpmn:documentation>By: accounts payable. From active to ended. Requires: reason. Effect: ERS stops from tomorrow.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_self_billing_agreement_active__if__Task_end_self_billing</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_end_self_billing__End_self_billing_agreement_ended</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_expire_self_billing" name="The agreement runs out" dodil:step="expire_self_billing" implementation="##unspecified">
   <bpmn:documentation>By: The system. From active to ended. When: valid_to is before today (the business date). Effect: listed for renewal 30 days before.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_self_billing_agreement_active__if__Task_expire_self_billing</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_expire_self_billing__End_self_billing_agreement_ended</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:exclusiveGateway id="Gateway_self_billing_agreement_proposed__if" name="Self billing agreement proposed: what next?">
   <bpmn:incoming>Flow_Task_propose_self_billing__Gateway_self_billing_agreement_proposed__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_self_billing_agreement_proposed__if__Task_approve_self_billing</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_self_billing_agreement_proposed__if__Task_reject_self_billing</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_self_billing_agreement_active__if" name="Self billing agreement active: what next?">
   <bpmn:incoming>Flow_Task_approve_self_billing__Gateway_self_billing_agreement_active__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_self_billing_agreement_active__if__Task_end_self_billing</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_self_billing_agreement_active__if__Task_expire_self_billing</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_self_billing_agreement_rejected" name="Self billing agreement rejected">
   <bpmn:incoming>Flow_Task_reject_self_billing__End_self_billing_agreement_rejected</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_self_billing_agreement_ended" name="Self billing agreement ended">
   <bpmn:incoming>Flow_Task_end_self_billing__End_self_billing_agreement_ended</bpmn:incoming>
   <bpmn:incoming>Flow_Task_expire_self_billing__End_self_billing_agreement_ended</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_self_billing_agreement__Task_propose_self_billing" sourceRef="Start_self_billing_agreement" targetRef="Task_propose_self_billing" />
  <bpmn:sequenceFlow id="Flow_Gateway_self_billing_agreement_proposed__if__Task_approve_self_billing" sourceRef="Gateway_self_billing_agreement_proposed__if" targetRef="Task_approve_self_billing" />
  <bpmn:sequenceFlow id="Flow_Gateway_self_billing_agreement_proposed__if__Task_reject_self_billing" sourceRef="Gateway_self_billing_agreement_proposed__if" targetRef="Task_reject_self_billing" />
  <bpmn:sequenceFlow id="Flow_Task_propose_self_billing__Gateway_self_billing_agreement_proposed__if" sourceRef="Task_propose_self_billing" targetRef="Gateway_self_billing_agreement_proposed__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_self_billing_agreement_active__if__Task_end_self_billing" sourceRef="Gateway_self_billing_agreement_active__if" targetRef="Task_end_self_billing" />
  <bpmn:sequenceFlow id="Flow_Gateway_self_billing_agreement_active__if__Task_expire_self_billing" sourceRef="Gateway_self_billing_agreement_active__if" targetRef="Task_expire_self_billing" />
  <bpmn:sequenceFlow id="Flow_Task_approve_self_billing__Gateway_self_billing_agreement_active__if" sourceRef="Task_approve_self_billing" targetRef="Gateway_self_billing_agreement_active__if" />
  <bpmn:sequenceFlow id="Flow_Task_reject_self_billing__End_self_billing_agreement_rejected" sourceRef="Task_reject_self_billing" targetRef="End_self_billing_agreement_rejected" />
  <bpmn:sequenceFlow id="Flow_Task_end_self_billing__End_self_billing_agreement_ended" sourceRef="Task_end_self_billing" targetRef="End_self_billing_agreement_ended" />
  <bpmn:sequenceFlow id="Flow_Task_expire_self_billing__End_self_billing_agreement_ended" sourceRef="Task_expire_self_billing" targetRef="End_self_billing_agreement_ended" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_purchasing_v8">
  <bpmndi:BPMNPlane id="BPMNPlane_purchasing_v8" bpmnElement="Collaboration_purchasing_v8">
   <bpmndi:BPMNShape id="Participant_purchasing_self_billing_agreement_di" bpmnElement="Participant_purchasing_self_billing_agreement" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1300" height="540" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_self_billing_agreement_payables_clerk_di" bpmnElement="Lane_self_billing_agreement_payables_clerk" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1270" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_self_billing_agreement_payables_approver_di" bpmnElement="Lane_self_billing_agreement_payables_approver" isHorizontal="true">
    <dc:Bounds x="30" y="140" width="1270" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_self_billing_agreement_system_di" bpmnElement="Lane_self_billing_agreement_system" isHorizontal="true">
    <dc:Bounds x="30" y="400" width="1270" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_self_billing_agreement_di" bpmnElement="Start_self_billing_agreement">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_propose_self_billing_di" bpmnElement="Task_propose_self_billing">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_approve_self_billing_di" bpmnElement="Task_approve_self_billing">
    <dc:Bounds x="635" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_reject_self_billing_di" bpmnElement="Task_reject_self_billing">
    <dc:Bounds x="635" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_end_self_billing_di" bpmnElement="Task_end_self_billing">
    <dc:Bounds x="975" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_expire_self_billing_di" bpmnElement="Task_expire_self_billing">
    <dc:Bounds x="975" y="420" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_self_billing_agreement_proposed__if_di" bpmnElement="Gateway_self_billing_agreement_proposed__if">
    <dc:Bounds x="490" y="175" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_self_billing_agreement_active__if_di" bpmnElement="Gateway_self_billing_agreement_active__if">
    <dc:Bounds x="830" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_self_billing_agreement_rejected_di" bpmnElement="End_self_billing_agreement_rejected">
    <dc:Bounds x="837" y="182" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_self_billing_agreement_ended_di" bpmnElement="End_self_billing_agreement_ended">
    <dc:Bounds x="1177" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_self_billing_agreement__Task_propose_self_billing_di" bpmnElement="Flow_Start_self_billing_agreement__Task_propose_self_billing">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_self_billing_agreement_proposed__if__Task_approve_self_billing_di" bpmnElement="Flow_Gateway_self_billing_agreement_proposed__if__Task_approve_self_billing">
    <di:waypoint x="540" y="200" />
    <di:waypoint x="635" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_self_billing_agreement_proposed__if__Task_reject_self_billing_di" bpmnElement="Flow_Gateway_self_billing_agreement_proposed__if__Task_reject_self_billing">
    <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_propose_self_billing__Gateway_self_billing_agreement_proposed__if_di" bpmnElement="Flow_Task_propose_self_billing__Gateway_self_billing_agreement_proposed__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_Gateway_self_billing_agreement_active__if__Task_end_self_billing_di" bpmnElement="Flow_Gateway_self_billing_agreement_active__if__Task_end_self_billing">
    <di:waypoint x="880" y="60" />
    <di:waypoint x="975" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_self_billing_agreement_active__if__Task_expire_self_billing_di" bpmnElement="Flow_Gateway_self_billing_agreement_active__if__Task_expire_self_billing">
    <di:waypoint x="880" y="60" />
    <di:waypoint x="950" y="60" />
    <di:waypoint x="950" y="460" />
    <di:waypoint x="975" y="460" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_approve_self_billing__Gateway_self_billing_agreement_active__if_di" bpmnElement="Flow_Task_approve_self_billing__Gateway_self_billing_agreement_active__if">
    <di:waypoint x="735" y="200" />
    <di:waypoint x="805" y="200" />
    <di:waypoint x="805" y="60" />
    <di:waypoint x="830" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_reject_self_billing__End_self_billing_agreement_rejected_di" bpmnElement="Flow_Task_reject_self_billing__End_self_billing_agreement_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_end_self_billing__End_self_billing_agreement_ended_di" bpmnElement="Flow_Task_end_self_billing__End_self_billing_agreement_ended">
    <di:waypoint x="1075" y="60" />
    <di:waypoint x="1177" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_expire_self_billing__End_self_billing_agreement_ended_di" bpmnElement="Flow_Task_expire_self_billing__End_self_billing_agreement_ended">
    <di:waypoint x="1075" y="460" />
    <di:waypoint x="1152" y="460" />
    <di:waypoint x="1152" y="60" />
    <di:waypoint x="1177" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>