dodil/erp-method

modules/tax/signoff/tax/history/tax_tax_code.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_tax_v1" name="Tax (VAT) processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_tax_v1">
  <bpmn:documentation>Tax (VAT): one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_tax_tax_code" name="Tax code" processRef="Process_tax_tax_code_v1" />
 </bpmn:collaboration>
 <bpmn:process id="Process_tax_tax_code_v1" name="Tax code" isExecutable="false">
  <bpmn:documentation>Lifecycle of the tax code, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, active, retired.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_tax_code">
   <bpmn:lane id="Lane_tax_code_system" name="The system">
    <bpmn:flowNodeRef>Start_tax_code</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_load_pack</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_tax_code_none__if</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_tax_code_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
    <bpmn:flowNodeRef>Task_add_code</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_activate_code</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_schedule_rate</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_retire_code</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_tax_code_retired</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_tax_code" name="Tax code needed">
   <bpmn:outgoing>Flow_Start_tax_code__Gateway_tax_code_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:serviceTask id="Task_load_pack" name="Load the country's codes" dodil:step="load_pack" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to draft. When: a new installation. Effect: the UK pack: S, R, Z, E, OS, RC, NV.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_tax_code_none__if__Task_load_pack</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_load_pack__Task_activate_code</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_add_code" name="Add a tax code" dodil:step="add_code">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From none to draft.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_tax_code_none__if__Task_add_code</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_add_code__Task_activate_code</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_activate_code" name="Activate the code" dodil:step="activate_code">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From draft to active. When: a treatment, a rate from a date, and the document wording where the treatment needs one (reverse charge).</bpmn:documentation>
   <bpmn:incoming>Flow_Task_load_pack__Task_activate_code</bpmn:incoming>
   <bpmn:incoming>Flow_Task_add_code__Task_activate_code</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_activate_code__Task_schedule_rate</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_schedule_rate" name="Schedule a rate change" dodil:step="schedule_rate" dodil:approval="true">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From active to active. Effect: a dated rate row; issued documents unchanged. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_activate_code__Task_schedule_rate</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_schedule_rate__Task_retire_code</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_retire_code" name="Retire the code" dodil:step="retire_code">
   <bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From active to retired. When: no rule still points at it. Effect: no new determinations; documents keep it.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_schedule_rate__Task_retire_code</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_retire_code__End_tax_code_retired</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_tax_code_none__if" name="New tax code?">
   <bpmn:incoming>Flow_Start_tax_code__Gateway_tax_code_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_tax_code_none__if__Task_load_pack</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_tax_code_none__if__Task_add_code</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_tax_code_retired" name="Tax code retired">
   <bpmn:incoming>Flow_Task_retire_code__End_tax_code_retired</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_tax_code_none__if__Task_load_pack" sourceRef="Gateway_tax_code_none__if" targetRef="Task_load_pack" />
  <bpmn:sequenceFlow id="Flow_Gateway_tax_code_none__if__Task_add_code" sourceRef="Gateway_tax_code_none__if" targetRef="Task_add_code" />
  <bpmn:sequenceFlow id="Flow_Start_tax_code__Gateway_tax_code_none__if" sourceRef="Start_tax_code" targetRef="Gateway_tax_code_none__if" />
  <bpmn:sequenceFlow id="Flow_Task_load_pack__Task_activate_code" sourceRef="Task_load_pack" targetRef="Task_activate_code" />
  <bpmn:sequenceFlow id="Flow_Task_add_code__Task_activate_code" sourceRef="Task_add_code" targetRef="Task_activate_code" />
  <bpmn:sequenceFlow id="Flow_Task_schedule_rate__Task_retire_code" sourceRef="Task_schedule_rate" targetRef="Task_retire_code" />
  <bpmn:sequenceFlow id="Flow_Task_activate_code__Task_schedule_rate" sourceRef="Task_activate_code" targetRef="Task_schedule_rate" />
  <bpmn:sequenceFlow id="Flow_Task_retire_code__End_tax_code_retired" sourceRef="Task_retire_code" targetRef="End_tax_code_retired" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_tax_v1">
  <bpmndi:BPMNPlane id="BPMNPlane_tax_v1" bpmnElement="Collaboration_tax_v1">
   <bpmndi:BPMNShape id="Participant_tax_tax_code_di" bpmnElement="Participant_tax_tax_code" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1300" height="280" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_tax_code_system_di" bpmnElement="Lane_tax_code_system" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1270" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_tax_code_tax_admin_di" bpmnElement="Lane_tax_code_tax_admin" isHorizontal="true">
    <dc:Bounds x="30" y="140" width="1270" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_tax_code_di" bpmnElement="Start_tax_code">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_load_pack_di" bpmnElement="Task_load_pack">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_add_code_di" bpmnElement="Task_add_code">
    <dc:Bounds x="465" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_activate_code_di" bpmnElement="Task_activate_code">
    <dc:Bounds x="635" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_schedule_rate_di" bpmnElement="Task_schedule_rate">
    <dc:Bounds x="805" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_retire_code_di" bpmnElement="Task_retire_code">
    <dc:Bounds x="975" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_tax_code_none__if_di" bpmnElement="Gateway_tax_code_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_tax_code_retired_di" bpmnElement="End_tax_code_retired">
    <dc:Bounds x="1177" y="182" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_tax_code_none__if__Task_load_pack_di" bpmnElement="Flow_Gateway_tax_code_none__if__Task_load_pack">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_tax_code_none__if__Task_add_code_di" bpmnElement="Flow_Gateway_tax_code_none__if__Task_add_code">
    <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_tax_code__Gateway_tax_code_none__if_di" bpmnElement="Flow_Start_tax_code__Gateway_tax_code_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_load_pack__Task_activate_code_di" bpmnElement="Flow_Task_load_pack__Task_activate_code">
    <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_Task_add_code__Task_activate_code_di" bpmnElement="Flow_Task_add_code__Task_activate_code">
    <di:waypoint x="565" y="200" />
    <di:waypoint x="635" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_schedule_rate__Task_retire_code_di" bpmnElement="Flow_Task_schedule_rate__Task_retire_code">
    <di:waypoint x="905" y="200" />
    <di:waypoint x="975" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_activate_code__Task_schedule_rate_di" bpmnElement="Flow_Task_activate_code__Task_schedule_rate">
    <di:waypoint x="735" y="200" />
    <di:waypoint x="805" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_retire_code__End_tax_code_retired_di" bpmnElement="Flow_Task_retire_code__End_tax_code_retired">
    <di:waypoint x="1075" y="200" />
    <di:waypoint x="1177" y="200" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>