dodil/erp-method

modules/inventory/signoff/inventory/history/inventory_transfer.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_inventory_v4" name="Stock &amp; warehouses processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
 <bpmn:collaboration id="Collaboration_inventory_v4">
  <bpmn:documentation>Stock &amp; warehouses: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_inventory_transfer" name="Transfer" processRef="Process_inventory_transfer_v4" />
 </bpmn:collaboration>
 <bpmn:process id="Process_inventory_transfer_v4" name="Transfer" isExecutable="false">
  <bpmn:documentation>Lifecycle of the transfer, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, in_transit, done, cancelled. Note: a move recorded by mistake is reversed by a new move naming it (INV-15), never edited</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_transfer">
   <bpmn:lane id="Lane_transfer_warehouse_manager" name="Whoever runs the warehouse (operations lead, the owner in a small firm)">
    <bpmn:flowNodeRef>Start_transfer</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_plan_transfer</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_change_stock_type</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_cancel_transfer</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_transfer_none__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_transfer_cancelled</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_transfer_stock_operator" name="The person on the floor (picker, packer, goods-in)">
    <bpmn:flowNodeRef>Task_put_away_stock</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_move_within_site</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_ship_to_site</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_receive_at_site</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_transfer_draft__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_transfer_done</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_transfer_system" name="The system">
    <bpmn:flowNodeRef>Task_provide_to_subcontractor</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_transfer" name="Transfer needed">
   <bpmn:outgoing>Flow_Start_transfer__Gateway_transfer_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_plan_transfer" name="Plan the move" dodil:step="plan_transfer">
   <bpmn:documentation>By: Whoever runs the warehouse (operations lead, the owner in a small firm). From none to draft. When: both locations internal, of one company (a subcontractor's or a customer's consignment location of the company counts as one, v3). Effect: a draft transfer; between an unrestricted and a quality or blocked location it is a release or a block (v2); a transfer to a subcontractor provides components (v3); from a replenishment proposal, the supplying site's stock (v3).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_none__if__Task_plan_transfer</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_plan_transfer__Gateway_transfer_draft__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_put_away_stock" name="Put away from goods-in" dodil:step="put_away_stock">
   <bpmn:documentation>By: The person on the floor (picker, packer, goods-in). From draft to done. When: readiness: bin_capacity (quantity, weight and volume within the bin's capacity, from the copied measures). Effect: the bin proposed by the putaway rules (fixed bin, addition to stock, next bin with room), or the one chosen with who; no value change (v3).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_draft__if__Task_put_away_stock</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_put_away_stock__End_transfer_done</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_provide_to_subcontractor" name="Send components to a subcontractor (v3)" dodil:step="provide_to_subcontractor" implementation="##unspecified">
   <bpmn:documentation>By: The system. From none to done. When: purchasing's subcontract order line names them (POST /subcontract-provisions, idempotent on move_ref); the source location holds them. Effect: a transfer to the subcontractor's location as stock still ours (special stock O), consumed later by the subcontract receipt.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_none__if__Task_provide_to_subcontractor</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_provide_to_subcontractor__End_transfer_done</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:userTask id="Task_change_stock_type" name="Change the stock type where it stands" dodil:step="change_stock_type">
   <bpmn:documentation>By: Whoever runs the warehouse (operations lead, the owner in a small firm). From none to done. When: the location accepts the new type; the stock is there. Requires: reason. Effect: a move between types at the same location, no value change; blocking a lot changes it everywhere it is (v3).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_none__if__Task_change_stock_type</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_change_stock_type__End_transfer_done</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_move_within_site" name="Move between bins" dodil:step="move_within_site">
   <bpmn:documentation>By: The person on the floor (picker, packer, goods-in). From draft to done. When: both bins in one warehouse; the source holds it; a lot or serial per tracked unit. Effect: numbered {warehouse}/INT/{seq:5}; one move bin -&gt; bin; no value change.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_draft__if__Task_move_within_site</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_move_within_site__End_transfer_done</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_ship_to_site" name="Ship to the other warehouse" dodil:step="ship_to_site">
   <bpmn:documentation>By: The person on the floor (picker, packer, goods-in). From draft to in_transit. When: the source holds it. Effect: a move bin -&gt; TRANSIT; counted in transit, available nowhere.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_draft__if__Task_ship_to_site</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_ship_to_site__Task_receive_at_site</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_receive_at_site" name="Receive at the other warehouse" dodil:step="receive_at_site">
   <bpmn:documentation>By: The person on the floor (picker, packer, goods-in). From in_transit to done. When: no more received than was shipped. Effect: a move TRANSIT -&gt; bin; a shortfall is left in transit until a count of TRANSIT or a loss approved by a second person is applied (gate transit_cleared, v3); expected_arrival_on was set when shipped, from the site's planned days.</bpmn:documentation>
   <bpmn:incoming>Flow_Task_ship_to_site__Task_receive_at_site</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_receive_at_site__End_transfer_done</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_cancel_transfer" name="Cancel the planned move" dodil:step="cancel_transfer">
   <bpmn:documentation>By: Whoever runs the warehouse (operations lead, the owner in a small firm). From draft to cancelled.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_transfer_draft__if__Task_cancel_transfer</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_cancel_transfer__End_transfer_cancelled</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:exclusiveGateway id="Gateway_transfer_none__if" name="New transfer?">
   <bpmn:incoming>Flow_Start_transfer__Gateway_transfer_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_transfer_none__if__Task_plan_transfer</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_transfer_none__if__Task_provide_to_subcontractor</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_transfer_none__if__Task_change_stock_type</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_transfer_draft__if" name="Transfer draft: what next?">
   <bpmn:incoming>Flow_Task_plan_transfer__Gateway_transfer_draft__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_transfer_draft__if__Task_put_away_stock</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_transfer_draft__if__Task_move_within_site</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_transfer_draft__if__Task_ship_to_site</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_transfer_draft__if__Task_cancel_transfer</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_transfer_done" name="Transfer done">
   <bpmn:incoming>Flow_Task_put_away_stock__End_transfer_done</bpmn:incoming>
   <bpmn:incoming>Flow_Task_provide_to_subcontractor__End_transfer_done</bpmn:incoming>
   <bpmn:incoming>Flow_Task_change_stock_type__End_transfer_done</bpmn:incoming>
   <bpmn:incoming>Flow_Task_move_within_site__End_transfer_done</bpmn:incoming>
   <bpmn:incoming>Flow_Task_receive_at_site__End_transfer_done</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:endEvent id="End_transfer_cancelled" name="Transfer cancelled">
   <bpmn:incoming>Flow_Task_cancel_transfer__End_transfer_cancelled</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_none__if__Task_plan_transfer" sourceRef="Gateway_transfer_none__if" targetRef="Task_plan_transfer" />
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_none__if__Task_provide_to_subcontractor" sourceRef="Gateway_transfer_none__if" targetRef="Task_provide_to_subcontractor" />
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_none__if__Task_change_stock_type" sourceRef="Gateway_transfer_none__if" targetRef="Task_change_stock_type" />
  <bpmn:sequenceFlow id="Flow_Start_transfer__Gateway_transfer_none__if" sourceRef="Start_transfer" targetRef="Gateway_transfer_none__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_draft__if__Task_put_away_stock" sourceRef="Gateway_transfer_draft__if" targetRef="Task_put_away_stock" />
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_draft__if__Task_move_within_site" sourceRef="Gateway_transfer_draft__if" targetRef="Task_move_within_site" />
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_draft__if__Task_ship_to_site" sourceRef="Gateway_transfer_draft__if" targetRef="Task_ship_to_site" />
  <bpmn:sequenceFlow id="Flow_Gateway_transfer_draft__if__Task_cancel_transfer" sourceRef="Gateway_transfer_draft__if" targetRef="Task_cancel_transfer" />
  <bpmn:sequenceFlow id="Flow_Task_plan_transfer__Gateway_transfer_draft__if" sourceRef="Task_plan_transfer" targetRef="Gateway_transfer_draft__if" />
  <bpmn:sequenceFlow id="Flow_Task_put_away_stock__End_transfer_done" sourceRef="Task_put_away_stock" targetRef="End_transfer_done" />
  <bpmn:sequenceFlow id="Flow_Task_provide_to_subcontractor__End_transfer_done" sourceRef="Task_provide_to_subcontractor" targetRef="End_transfer_done" />
  <bpmn:sequenceFlow id="Flow_Task_change_stock_type__End_transfer_done" sourceRef="Task_change_stock_type" targetRef="End_transfer_done" />
  <bpmn:sequenceFlow id="Flow_Task_move_within_site__End_transfer_done" sourceRef="Task_move_within_site" targetRef="End_transfer_done" />
  <bpmn:sequenceFlow id="Flow_Task_ship_to_site__Task_receive_at_site" sourceRef="Task_ship_to_site" targetRef="Task_receive_at_site" />
  <bpmn:sequenceFlow id="Flow_Task_receive_at_site__End_transfer_done" sourceRef="Task_receive_at_site" targetRef="End_transfer_done" />
  <bpmn:sequenceFlow id="Flow_Task_cancel_transfer__End_transfer_cancelled" sourceRef="Task_cancel_transfer" targetRef="End_transfer_cancelled" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_inventory_v4">
  <bpmndi:BPMNPlane id="BPMNPlane_inventory_v4" bpmnElement="Collaboration_inventory_v4">
   <bpmndi:BPMNShape id="Participant_inventory_transfer_di" bpmnElement="Participant_inventory_transfer" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1130" height="780" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_transfer_warehouse_manager_di" bpmnElement="Lane_transfer_warehouse_manager" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1100" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_transfer_stock_operator_di" bpmnElement="Lane_transfer_stock_operator" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1100" height="380" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_transfer_system_di" bpmnElement="Lane_transfer_system" isHorizontal="true">
    <dc:Bounds x="30" y="640" width="1100" height="140" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_transfer_di" bpmnElement="Start_transfer">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_plan_transfer_di" bpmnElement="Task_plan_transfer">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_put_away_stock_di" bpmnElement="Task_put_away_stock">
    <dc:Bounds x="805" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_provide_to_subcontractor_di" bpmnElement="Task_provide_to_subcontractor">
    <dc:Bounds x="465" y="660" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_change_stock_type_di" bpmnElement="Task_change_stock_type">
    <dc:Bounds x="465" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_move_within_site_di" bpmnElement="Task_move_within_site">
    <dc:Bounds x="805" y="400" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_ship_to_site_di" bpmnElement="Task_ship_to_site">
    <dc:Bounds x="805" y="520" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_receive_at_site_di" bpmnElement="Task_receive_at_site">
    <dc:Bounds x="975" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_cancel_transfer_di" bpmnElement="Task_cancel_transfer">
    <dc:Bounds x="805" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_transfer_none__if_di" bpmnElement="Gateway_transfer_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_transfer_draft__if_di" bpmnElement="Gateway_transfer_draft__if">
    <dc:Bounds x="660" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_transfer_done_di" bpmnElement="End_transfer_done">
    <dc:Bounds x="667" y="422" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_transfer_cancelled_di" bpmnElement="End_transfer_cancelled">
    <dc:Bounds x="1007" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_none__if__Task_plan_transfer_di" bpmnElement="Flow_Gateway_transfer_none__if__Task_plan_transfer">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_none__if__Task_provide_to_subcontractor_di" bpmnElement="Flow_Gateway_transfer_none__if__Task_provide_to_subcontractor">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="700" />
    <di:waypoint x="465" y="700" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_none__if__Task_change_stock_type_di" bpmnElement="Flow_Gateway_transfer_none__if__Task_change_stock_type">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="440" y="60" />
    <di:waypoint x="440" y="180" />
    <di:waypoint x="465" y="180" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Start_transfer__Gateway_transfer_none__if_di" bpmnElement="Flow_Start_transfer__Gateway_transfer_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_draft__if__Task_put_away_stock_di" bpmnElement="Flow_Gateway_transfer_draft__if__Task_put_away_stock">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="805" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_draft__if__Task_move_within_site_di" bpmnElement="Flow_Gateway_transfer_draft__if__Task_move_within_site">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="780" y="320" />
    <di:waypoint x="780" y="440" />
    <di:waypoint x="805" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_draft__if__Task_ship_to_site_di" bpmnElement="Flow_Gateway_transfer_draft__if__Task_ship_to_site">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="780" y="320" />
    <di:waypoint x="780" y="560" />
    <di:waypoint x="805" y="560" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_transfer_draft__if__Task_cancel_transfer_di" bpmnElement="Flow_Gateway_transfer_draft__if__Task_cancel_transfer">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="780" y="320" />
    <di:waypoint x="780" y="60" />
    <di:waypoint x="805" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_plan_transfer__Gateway_transfer_draft__if_di" bpmnElement="Flow_Task_plan_transfer__Gateway_transfer_draft__if">
    <di:waypoint x="565" y="60" />
    <di:waypoint x="635" y="60" />
    <di:waypoint x="635" y="320" />
    <di:waypoint x="660" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_put_away_stock__End_transfer_done_di" bpmnElement="Flow_Task_put_away_stock__End_transfer_done">
    <di:waypoint x="855" y="360" />
    <di:waypoint x="855" y="473" />
    <di:waypoint x="685" y="473" />
    <di:waypoint x="685" y="458" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_provide_to_subcontractor__End_transfer_done_di" bpmnElement="Flow_Task_provide_to_subcontractor__End_transfer_done">
    <di:waypoint x="565" y="700" />
    <di:waypoint x="642" y="700" />
    <di:waypoint x="642" y="440" />
    <di:waypoint x="667" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_change_stock_type__End_transfer_done_di" bpmnElement="Flow_Task_change_stock_type__End_transfer_done">
    <di:waypoint x="565" y="180" />
    <di:waypoint x="642" y="180" />
    <di:waypoint x="642" y="440" />
    <di:waypoint x="667" y="440" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_move_within_site__End_transfer_done_di" bpmnElement="Flow_Task_move_within_site__End_transfer_done">
    <di:waypoint x="855" y="480" />
    <di:waypoint x="855" y="501" />
    <di:waypoint x="685" y="501" />
    <di:waypoint x="685" y="458" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_ship_to_site__Task_receive_at_site_di" bpmnElement="Flow_Task_ship_to_site__Task_receive_at_site">
    <di:waypoint x="905" y="560" />
    <di:waypoint x="950" y="560" />
    <di:waypoint x="950" y="320" />
    <di:waypoint x="975" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_receive_at_site__End_transfer_done_di" bpmnElement="Flow_Task_receive_at_site__End_transfer_done">
    <di:waypoint x="1025" y="360" />
    <di:waypoint x="1025" y="485" />
    <di:waypoint x="685" y="485" />
    <di:waypoint x="685" y="458" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_cancel_transfer__End_transfer_cancelled_di" bpmnElement="Flow_Task_cancel_transfer__End_transfer_cancelled">
    <di:waypoint x="905" y="60" />
    <di:waypoint x="1007" y="60" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>