dodil/erp-method

modules/pos/signoff/pos/history/pos_session.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_pos_v1" name="Point of sale (shops and tills) processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_pos_v1">
  <bpmn:documentation>Point of sale (shops and tills): one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_pos_session" name="Session" processRef="Process_pos_session_v1" />
 </bpmn:collaboration>
 <bpmn:process id="Process_pos_session_v1" name="Session" isExecutable="false">
  <bpmn:documentation>Lifecycle of the session, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: open, counted, closed, force_closed, posted. Note: a session never reopens; a correction is a later document in a later session</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_session">
   <bpmn:lane id="Lane_session_cashier" name="Barista / cashier">
    <bpmn:flowNodeRef>Start_session</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_open_session</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_record_cash_move</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_count_session</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_record_cash_move__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_record_cash_move__if_end</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_session_open__if</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_session_shift_lead" name="Shift lead / shop manager">
    <bpmn:flowNodeRef>Task_approve_difference</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_force_close_session</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_session_system" name="The system">
    <bpmn:flowNodeRef>Task_post_session</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_session_posted</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_session" name="Session needed">
   <bpmn:outgoing>Flow_Start_session__Task_open_session</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_open_session" name="Open the session with a float" dodil:step="open_session">
   <bpmn:documentation>By: Barista / cashier. From none to open. When: no open session on the register; the fiscal device ready where the profile needs one; the cashier employed today (hr, when installed); the float counted. Effect: business date fixed (business_timezone and day_cutoff); register snapshot built (POS-30).</bpmn:documentation>
   <bpmn:incoming>Flow_Start_session__Task_open_session</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_open_session__Gateway_record_cash_move__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_record_cash_move" name="Record a safe drop or paid-out" dodil:step="record_cash_move">
   <bpmn:documentation>By: Barista / cashier. From open to open. When: amount positive, NUMERIC(18,2); a paid-out above paid_out_limit approved by another person.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_record_cash_move__if__Task_record_cash_move</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_record_cash_move__Gateway_record_cash_move__if_end</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_count_session" name="Count the drawer" dodil:step="count_session">
   <bpmn:documentation>By: Barista / cashier. From open to counted. When: every receipt synced (the register's last number equals the server's). Effect: difference = counted - expected; within the threshold it closes at once.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_session_open__if__Task_count_session</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_count_session__Task_approve_difference</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_approve_difference" name="Approve the difference" dodil:step="approve_difference" dodil:approval="true">
   <bpmn:documentation>By: Shift lead / shop manager. From counted to closed. When: the approver is not the counter (email AND sub). Requires: reason. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_count_session__Task_approve_difference</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_approve_difference__Task_post_session</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_force_close_session" name="Force the session closed" dodil:step="force_close_session" dodil:approval="true">
   <bpmn:documentation>By: Shift lead / shop manager. From open to force_closed. Requires: reason. Effect: the claimed gap of receipt numbers recorded; late receipts accepted into this session only. An approval.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_session_open__if__Task_force_close_session</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_force_close_session__Task_post_session</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_post_session" name="Posted with the shop day" dodil:step="post_session" implementation="##unspecified">
   <bpmn:documentation>By: The system. From closed / force_closed to posted. When: the shop day posted (POS-20).</bpmn:documentation>
   <bpmn:incoming>Flow_Task_approve_difference__Task_post_session</bpmn:incoming>
   <bpmn:incoming>Flow_Task_force_close_session__Task_post_session</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_post_session__End_session_posted</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:exclusiveGateway id="Gateway_record_cash_move__if" name="amount positive, NUMERIC(18,2); a paid-out above paid_out_limit approved by another person?">
   <bpmn:incoming>Flow_Task_open_session__Gateway_record_cash_move__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_record_cash_move__if__Task_record_cash_move</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_record_cash_move__if__Gateway_record_cash_move__if_end</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_record_cash_move__if_end">
   <bpmn:incoming>Flow_Gateway_record_cash_move__if__Gateway_record_cash_move__if_end</bpmn:incoming>
   <bpmn:incoming>Flow_Task_record_cash_move__Gateway_record_cash_move__if_end</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_record_cash_move__if_end__Gateway_session_open__if</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_session_open__if" name="Session open: what next?">
   <bpmn:incoming>Flow_Gateway_record_cash_move__if_end__Gateway_session_open__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_session_open__if__Task_count_session</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_session_open__if__Task_force_close_session</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_session_posted" name="Session posted">
   <bpmn:incoming>Flow_Task_post_session__End_session_posted</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Start_session__Task_open_session" sourceRef="Start_session" targetRef="Task_open_session" />
  <bpmn:sequenceFlow id="Flow_Gateway_record_cash_move__if__Task_record_cash_move" name="amount positive, NUMERIC(18,2); a paid-out above paid_out_limit approved by another person" sourceRef="Gateway_record_cash_move__if" targetRef="Task_record_cash_move" />
  <bpmn:sequenceFlow id="Flow_Gateway_record_cash_move__if__Gateway_record_cash_move__if_end" name="otherwise" sourceRef="Gateway_record_cash_move__if" targetRef="Gateway_record_cash_move__if_end" />
  <bpmn:sequenceFlow id="Flow_Task_record_cash_move__Gateway_record_cash_move__if_end" sourceRef="Task_record_cash_move" targetRef="Gateway_record_cash_move__if_end" />
  <bpmn:sequenceFlow id="Flow_Gateway_session_open__if__Task_count_session" sourceRef="Gateway_session_open__if" targetRef="Task_count_session" />
  <bpmn:sequenceFlow id="Flow_Gateway_session_open__if__Task_force_close_session" sourceRef="Gateway_session_open__if" targetRef="Task_force_close_session" />
  <bpmn:sequenceFlow id="Flow_Gateway_record_cash_move__if_end__Gateway_session_open__if" sourceRef="Gateway_record_cash_move__if_end" targetRef="Gateway_session_open__if" />
  <bpmn:sequenceFlow id="Flow_Task_open_session__Gateway_record_cash_move__if" sourceRef="Task_open_session" targetRef="Gateway_record_cash_move__if" />
  <bpmn:sequenceFlow id="Flow_Task_count_session__Task_approve_difference" sourceRef="Task_count_session" targetRef="Task_approve_difference" />
  <bpmn:sequenceFlow id="Flow_Task_approve_difference__Task_post_session" sourceRef="Task_approve_difference" targetRef="Task_post_session" />
  <bpmn:sequenceFlow id="Flow_Task_force_close_session__Task_post_session" sourceRef="Task_force_close_session" targetRef="Task_post_session" />
  <bpmn:sequenceFlow id="Flow_Task_post_session__End_session_posted" sourceRef="Task_post_session" targetRef="End_session_posted" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_pos_v1">
  <bpmndi:BPMNPlane id="BPMNPlane_pos_v1" bpmnElement="Collaboration_pos_v1">
   <bpmndi:BPMNShape id="Participant_pos_session_di" bpmnElement="Participant_pos_session" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1470" height="540" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_session_cashier_di" bpmnElement="Lane_session_cashier" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1440" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_session_shift_lead_di" bpmnElement="Lane_session_shift_lead" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1440" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_session_system_di" bpmnElement="Lane_session_system" isHorizontal="true">
    <dc:Bounds x="30" y="400" width="1440" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_session_di" bpmnElement="Start_session">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_open_session_di" bpmnElement="Task_open_session">
    <dc:Bounds x="295" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_record_cash_move_di" bpmnElement="Task_record_cash_move">
    <dc:Bounds x="635" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_count_session_di" bpmnElement="Task_count_session">
    <dc:Bounds x="975" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_approve_difference_di" bpmnElement="Task_approve_difference">
    <dc:Bounds x="1145" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_force_close_session_di" bpmnElement="Task_force_close_session">
    <dc:Bounds x="975" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_post_session_di" bpmnElement="Task_post_session">
    <dc:Bounds x="1145" y="420" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_record_cash_move__if_di" bpmnElement="Gateway_record_cash_move__if">
    <dc:Bounds x="490" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_record_cash_move__if_end_di" bpmnElement="Gateway_record_cash_move__if_end">
    <dc:Bounds x="660" y="155" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_session_open__if_di" bpmnElement="Gateway_session_open__if">
    <dc:Bounds x="830" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_session_posted_di" bpmnElement="End_session_posted">
    <dc:Bounds x="1347" y="442" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Start_session__Task_open_session_di" bpmnElement="Flow_Start_session__Task_open_session">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="295" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_record_cash_move__if__Task_record_cash_move_di" bpmnElement="Flow_Gateway_record_cash_move__if__Task_record_cash_move">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_record_cash_move__if__Gateway_record_cash_move__if_end_di" bpmnElement="Flow_Gateway_record_cash_move__if__Gateway_record_cash_move__if_end">
    <di:waypoint x="540" y="60" />
    <di:waypoint x="635" y="60" />
    <di:waypoint x="635" y="180" />
    <di:waypoint x="660" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_record_cash_move__Gateway_record_cash_move__if_end_di" bpmnElement="Flow_Task_record_cash_move__Gateway_record_cash_move__if_end">
    <di:waypoint x="685" y="100" />
    <di:waypoint x="685" y="220" />
    <di:waypoint x="685" y="220" />
    <di:waypoint x="685" y="205" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_session_open__if__Task_count_session_di" bpmnElement="Flow_Gateway_session_open__if__Task_count_session">
    <di:waypoint x="880" y="60" />
    <di:waypoint x="975" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_session_open__if__Task_force_close_session_di" bpmnElement="Flow_Gateway_session_open__if__Task_force_close_session">
    <di:waypoint x="880" y="60" />
    <di:waypoint x="950" y="60" />
    <di:waypoint x="950" y="320" />
    <di:waypoint x="975" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_record_cash_move__if_end__Gateway_session_open__if_di" bpmnElement="Flow_Gateway_record_cash_move__if_end__Gateway_session_open__if">
    <di:waypoint x="710" y="180" />
    <di:waypoint x="805" y="180" />
    <di:waypoint x="805" y="60" />
    <di:waypoint x="830" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_open_session__Gateway_record_cash_move__if_di" bpmnElement="Flow_Task_open_session__Gateway_record_cash_move__if">
    <di:waypoint x="395" y="60" />
    <di:waypoint x="490" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_count_session__Task_approve_difference_di" bpmnElement="Flow_Task_count_session__Task_approve_difference">
    <di:waypoint x="1075" y="60" />
    <di:waypoint x="1120" y="60" />
    <di:waypoint x="1120" y="320" />
    <di:waypoint x="1145" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_approve_difference__Task_post_session_di" bpmnElement="Flow_Task_approve_difference__Task_post_session">
    <di:waypoint x="1195" y="360" />
    <di:waypoint x="1195" y="521" />
    <di:waypoint x="1195" y="521" />
    <di:waypoint x="1195" y="500" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_force_close_session__Task_post_session_di" bpmnElement="Flow_Task_force_close_session__Task_post_session">
    <di:waypoint x="1075" y="320" />
    <di:waypoint x="1120" y="320" />
    <di:waypoint x="1120" y="460" />
    <di:waypoint x="1145" y="460" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_post_session__End_session_posted_di" bpmnElement="Flow_Task_post_session__End_session_posted">
    <di:waypoint x="1245" y="460" />
    <di:waypoint x="1347" y="460" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>