dodil/erp-method

modules/payroll/signoff/payroll/payroll_prl_ytd_run.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_payroll_v2" name="Payroll processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_payroll_v2">
  <bpmn:documentation>Payroll: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_payroll_prl_ytd_run" name="Prl ytd run" processRef="Process_payroll_prl_ytd_run_v2" />
 </bpmn:collaboration>
 <bpmn:process id="Process_payroll_prl_ytd_run_v2" name="Prl ytd run" isExecutable="false">
  <bpmn:documentation>Lifecycle of the prl ytd run, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: loaded, reconciled, signed, discarded.</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_prl_ytd_run">
   <bpmn:lane id="Lane_prl_ytd_run_system" name="The system">
    <bpmn:flowNodeRef>Start_prl_ytd_run</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_load_prl_ytd</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_reconcile_prl_migration</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_prl_ytd_run_loaded__if</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_prl_ytd_run_owner" name="The owner (or whoever the owner names)">
    <bpmn:flowNodeRef>Task_sign_prl_migration</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_discard_prl_migration</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_prl_ytd_run_reconciled__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_prl_ytd_run_signed</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_prl_ytd_run_discarded</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_prl_ytd_run" name="Prl ytd run needed">
   <bpmn:outgoing>Flow_Start_prl_ytd_run__Task_load_prl_ytd</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:serviceTask id="Task_load_prl_ytd" name="Load the previous provider's year to date" dodil:step="load_prl_ytd" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to loaded. When: hr's migration signed; the provider's last FPS file attached. Effect: v2 (pattern §11, seemo's decided answer 4): staging rows only (prl_migration_row, keyed by the source id); nothing written to the ledger, balances or journals.</bpmn:documentation>
   <bpmn:incoming>Flow_Start_prl_ytd_run__Task_load_prl_ytd</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_load_prl_ytd__Gateway_prl_ytd_run_loaded__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:serviceTask id="Task_reconcile_prl_migration" name="Reconcile against the provider's FPS" dodil:step="reconcile_prl_migration" implementation="##unspecified">
   <bpmn:documentation>By: The system. From loaded to reconciled.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_prl_ytd_run_loaded__if__Task_reconcile_prl_migration</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_reconcile_prl_migration__Gateway_prl_ytd_run_reconciled__if</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_sign_prl_migration" name="Sign the reconciliation" dodil:step="sign_prl_migration" dodil:approval="true">
   <bpmn:documentation>By: The owner (or whoever the owner names). From reconciled to signed. When: every total equal to the penny. Effect: v2 (decided answer 4): the staged rows written through this module's normal use cases, idempotent on the source key; the first write to the ledger; a signed run is later reversed by reversing entries, never deleted. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_prl_ytd_run_reconciled__if__Task_sign_prl_migration</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_sign_prl_migration__End_prl_ytd_run_signed</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_discard_prl_migration" name="Discard the load" dodil:step="discard_prl_migration">
   <bpmn:documentation>By: The owner (or whoever the owner names). From loaded / reconciled to discarded. Requires: reason. Effect: v2 (decided answer 4): the run's staging rows deleted, nothing else (no ledger row was written).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_prl_ytd_run_loaded__if__Task_discard_prl_migration</bpmn:incoming>
   <bpmn:incoming>Flow_Gateway_prl_ytd_run_reconciled__if__Task_discard_prl_migration</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_discard_prl_migration__End_prl_ytd_run_discarded</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_prl_ytd_run_loaded__if" name="Prl ytd run loaded: what next?">
   <bpmn:incoming>Flow_Task_load_prl_ytd__Gateway_prl_ytd_run_loaded__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_prl_ytd_run_loaded__if__Task_reconcile_prl_migration</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_prl_ytd_run_loaded__if__Task_discard_prl_migration</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_prl_ytd_run_reconciled__if" name="Prl ytd run reconciled: what next?">
   <bpmn:incoming>Flow_Task_reconcile_prl_migration__Gateway_prl_ytd_run_reconciled__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_prl_ytd_run_reconciled__if__Task_sign_prl_migration</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_prl_ytd_run_reconciled__if__Task_discard_prl_migration</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_prl_ytd_run_signed" name="Prl ytd run signed">
   <bpmn:incoming>Flow_Task_sign_prl_migration__End_prl_ytd_run_signed</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_prl_ytd_run_discarded" name="Prl ytd run discarded">
   <bpmn:incoming>Flow_Task_discard_prl_migration__End_prl_ytd_run_discarded</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_prl_ytd_run__Task_load_prl_ytd" sourceRef="Start_prl_ytd_run" targetRef="Task_load_prl_ytd" />
  <bpmn:sequenceFlow id="Flow_Gateway_prl_ytd_run_loaded__if__Task_reconcile_prl_migration" sourceRef="Gateway_prl_ytd_run_loaded__if" targetRef="Task_reconcile_prl_migration" />
  <bpmn:sequenceFlow id="Flow_Gateway_prl_ytd_run_loaded__if__Task_discard_prl_migration" sourceRef="Gateway_prl_ytd_run_loaded__if" targetRef="Task_discard_prl_migration" />
  <bpmn:sequenceFlow id="Flow_Task_load_prl_ytd__Gateway_prl_ytd_run_loaded__if" sourceRef="Task_load_prl_ytd" targetRef="Gateway_prl_ytd_run_loaded__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_prl_ytd_run_reconciled__if__Task_sign_prl_migration" sourceRef="Gateway_prl_ytd_run_reconciled__if" targetRef="Task_sign_prl_migration" />
  <bpmn:sequenceFlow id="Flow_Gateway_prl_ytd_run_reconciled__if__Task_discard_prl_migration" sourceRef="Gateway_prl_ytd_run_reconciled__if" targetRef="Task_discard_prl_migration" />
  <bpmn:sequenceFlow id="Flow_Task_reconcile_prl_migration__Gateway_prl_ytd_run_reconciled__if" sourceRef="Task_reconcile_prl_migration" targetRef="Gateway_prl_ytd_run_reconciled__if" />
  <bpmn:sequenceFlow id="Flow_Task_sign_prl_migration__End_prl_ytd_run_signed" sourceRef="Task_sign_prl_migration" targetRef="End_prl_ytd_run_signed" />
  <bpmn:sequenceFlow id="Flow_Task_discard_prl_migration__End_prl_ytd_run_discarded" sourceRef="Task_discard_prl_migration" targetRef="End_prl_ytd_run_discarded" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_payroll_v2">
  <bpmndi:BPMNPlane id="BPMNPlane_payroll_v2" bpmnElement="Collaboration_payroll_v2">
   <bpmndi:BPMNShape id="Participant_payroll_prl_ytd_run_di" bpmnElement="Participant_payroll_prl_ytd_run" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1300" height="400" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_prl_ytd_run_system_di" bpmnElement="Lane_prl_ytd_run_system" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1270" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_prl_ytd_run_owner_di" bpmnElement="Lane_prl_ytd_run_owner" isHorizontal="true">
    <dc:Bounds x="30" y="140" width="1270" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_prl_ytd_run_di" bpmnElement="Start_prl_ytd_run">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_load_prl_ytd_di" bpmnElement="Task_load_prl_ytd">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_reconcile_prl_migration_di" bpmnElement="Task_reconcile_prl_migration">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_sign_prl_migration_di" bpmnElement="Task_sign_prl_migration">
    <dc:Bounds x="975" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_discard_prl_migration_di" bpmnElement="Task_discard_prl_migration">
    <dc:Bounds x="635" y="160" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_prl_ytd_run_loaded__if_di" bpmnElement="Gateway_prl_ytd_run_loaded__if">
    <dc:Bounds x="490" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_prl_ytd_run_reconciled__if_di" bpmnElement="Gateway_prl_ytd_run_reconciled__if">
    <dc:Bounds x="830" y="175" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_prl_ytd_run_signed_di" bpmnElement="End_prl_ytd_run_signed">
    <dc:Bounds x="1177" y="182" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_prl_ytd_run_discarded_di" bpmnElement="End_prl_ytd_run_discarded">
    <dc:Bounds x="837" y="302" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_prl_ytd_run__Task_load_prl_ytd_di" bpmnElement="Flow_Start_prl_ytd_run__Task_load_prl_ytd">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_prl_ytd_run_loaded__if__Task_reconcile_prl_migration_di" bpmnElement="Flow_Gateway_prl_ytd_run_loaded__if__Task_reconcile_prl_migration">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_prl_ytd_run_loaded__if__Task_discard_prl_migration_di" bpmnElement="Flow_Gateway_prl_ytd_run_loaded__if__Task_discard_prl_migration">
    <di:waypoint x="540" 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_load_prl_ytd__Gateway_prl_ytd_run_loaded__if_di" bpmnElement="Flow_Task_load_prl_ytd__Gateway_prl_ytd_run_loaded__if">
    <di:waypoint x="395" y="60" />
    <di:waypoint x="490" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_prl_ytd_run_reconciled__if__Task_sign_prl_migration_di" bpmnElement="Flow_Gateway_prl_ytd_run_reconciled__if__Task_sign_prl_migration">
    <di:waypoint x="880" y="200" />
    <di:waypoint x="975" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_prl_ytd_run_reconciled__if__Task_discard_prl_migration_di" bpmnElement="Flow_Gateway_prl_ytd_run_reconciled__if__Task_discard_prl_migration">
    <di:waypoint x="855" y="225" />
    <di:waypoint x="855" y="255" />
    <di:waypoint x="685" y="255" />
    <di:waypoint x="685" y="240" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_reconcile_prl_migration__Gateway_prl_ytd_run_reconciled__if_di" bpmnElement="Flow_Task_reconcile_prl_migration__Gateway_prl_ytd_run_reconciled__if">
    <di:waypoint x="735" y="60" />
    <di:waypoint x="805" y="60" />
    <di:waypoint x="805" y="200" />
    <di:waypoint x="830" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_sign_prl_migration__End_prl_ytd_run_signed_di" bpmnElement="Flow_Task_sign_prl_migration__End_prl_ytd_run_signed">
    <di:waypoint x="1075" y="200" />
    <di:waypoint x="1177" y="200" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_discard_prl_migration__End_prl_ytd_run_discarded_di" bpmnElement="Flow_Task_discard_prl_migration__End_prl_ytd_run_discarded">
    <di:waypoint x="735" y="200" />
    <di:waypoint x="812" y="200" />
    <di:waypoint x="812" y="320" />
    <di:waypoint x="837" y="320" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>