dodil/erp-method

modules/purchasing/signoff/purchasing/history/purchasing_receipt.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_purchasing_v4" 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_v4">
  <bpmn:documentation>Purchasing &amp; suppliers: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
  <bpmn:participant id="Participant_purchasing_receipt" name="Receipt" processRef="Process_purchasing_receipt_v4" />
 </bpmn:collaboration>
 <bpmn:process id="Process_purchasing_receipt_v4" name="Receipt" isExecutable="false">
  <bpmn:documentation>Lifecycle of the receipt, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: recorded, handed_over. Note: a receipt is a fact and is never edited; a wrong receipt is corrected by a return row, and a missing one by another receipt</bpmn:documentation>
  <bpmn:laneSet id="LaneSet_receipt">
   <bpmn:lane id="Lane_receipt_receiver" name="whoever takes delivery (stores, site, reception)">
    <bpmn:flowNodeRef>Start_receipt</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_record_goods_receipt</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_record_return</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_receipt_none__if</bpmn:flowNodeRef>
   </bpmn:lane>
   <bpmn:lane id="Lane_receipt_system" name="The system">
    <bpmn:flowNodeRef>Task_hand_to_inventory</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Task_no_stock_kept</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>Gateway_receipt_recorded__if</bpmn:flowNodeRef>
    <bpmn:flowNodeRef>End_receipt_handed_over</bpmn:flowNodeRef>
   </bpmn:lane>
  </bpmn:laneSet>
  <bpmn:startEvent id="Start_receipt" name="Receipt needed">
   <bpmn:outgoing>Flow_Start_receipt__Gateway_receipt_none__if</bpmn:outgoing>
  </bpmn:startEvent>
  <bpmn:userTask id="Task_record_goods_receipt" name="Record what arrived" dodil:step="record_goods_receipt">
   <bpmn:documentation>By: whoever takes delivery (stores, site, reception). From none to recorded. When: a confirmed order; the delivery date is today or earlier; each quantity is above zero. Effect: keyed rcpt:&lt;purchase_order_id&gt;:&lt;delivery_note&gt;; quantity also kept in the base unit.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_receipt_none__if__Task_record_goods_receipt</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_record_goods_receipt__Gateway_receipt_recorded__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:userTask id="Task_record_return" name="Return goods to the supplier" dodil:step="record_return">
   <bpmn:documentation>By: whoever takes delivery (stores, site, reception). From none to recorded. When: no more than was received on the receipt it names. Requires: reason. Effect: a reversing receipt row (kind return) dated today; the original receipt untouched.</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_receipt_none__if__Task_record_return</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_record_return__Gateway_receipt_recorded__if</bpmn:outgoing>
  </bpmn:userTask>
  <bpmn:serviceTask id="Task_hand_to_inventory" name="Tell inventory what arrived and where" dodil:step="hand_to_inventory" implementation="##unspecified">
   <bpmn:documentation>By: The system. From recorded to handed_over. When: inventory is installed. Effect: inventory's POST /receipts (a return: POST /returns-to-supplier) per line, keyed move_ref pur:&lt;receipt_id&gt;:&lt;line_no&gt;; {move_id, quantity_base} answered and the move id kept on the line; a consignment line names stock_owner_bp_id, a subcontract line consume_provided, a line with planned delivery costs a unit cost including them (v4).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_receipt_recorded__if__Task_hand_to_inventory</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_hand_to_inventory__End_receipt_handed_over</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:serviceTask id="Task_no_stock_kept" name="Keep the receipt without stock" dodil:step="no_stock_kept" implementation="##unspecified">
   <bpmn:documentation>By: The system. From recorded to handed_over. When: inventory is not installed, the line is a service, or the line is assigned to an asset, a cost centre or a project (non-valuated; v4).</bpmn:documentation>
   <bpmn:incoming>Flow_Gateway_receipt_recorded__if__Task_no_stock_kept</bpmn:incoming>
   <bpmn:outgoing>Flow_Task_no_stock_kept__End_receipt_handed_over</bpmn:outgoing>
  </bpmn:serviceTask>
  <bpmn:exclusiveGateway id="Gateway_receipt_none__if" name="New receipt?">
   <bpmn:incoming>Flow_Start_receipt__Gateway_receipt_none__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_receipt_none__if__Task_record_goods_receipt</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_receipt_none__if__Task_record_return</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:exclusiveGateway id="Gateway_receipt_recorded__if" name="Receipt recorded: what next?">
   <bpmn:incoming>Flow_Task_record_goods_receipt__Gateway_receipt_recorded__if</bpmn:incoming>
   <bpmn:incoming>Flow_Task_record_return__Gateway_receipt_recorded__if</bpmn:incoming>
   <bpmn:outgoing>Flow_Gateway_receipt_recorded__if__Task_hand_to_inventory</bpmn:outgoing>
   <bpmn:outgoing>Flow_Gateway_receipt_recorded__if__Task_no_stock_kept</bpmn:outgoing>
  </bpmn:exclusiveGateway>
  <bpmn:endEvent id="End_receipt_handed_over" name="Receipt handed over">
   <bpmn:incoming>Flow_Task_hand_to_inventory__End_receipt_handed_over</bpmn:incoming>
   <bpmn:incoming>Flow_Task_no_stock_kept__End_receipt_handed_over</bpmn:incoming>
  </bpmn:endEvent>
  <bpmn:sequenceFlow id="Flow_Gateway_receipt_none__if__Task_record_goods_receipt" sourceRef="Gateway_receipt_none__if" targetRef="Task_record_goods_receipt" />
  <bpmn:sequenceFlow id="Flow_Gateway_receipt_none__if__Task_record_return" sourceRef="Gateway_receipt_none__if" targetRef="Task_record_return" />
  <bpmn:sequenceFlow id="Flow_Start_receipt__Gateway_receipt_none__if" sourceRef="Start_receipt" targetRef="Gateway_receipt_none__if" />
  <bpmn:sequenceFlow id="Flow_Gateway_receipt_recorded__if__Task_hand_to_inventory" sourceRef="Gateway_receipt_recorded__if" targetRef="Task_hand_to_inventory" />
  <bpmn:sequenceFlow id="Flow_Gateway_receipt_recorded__if__Task_no_stock_kept" sourceRef="Gateway_receipt_recorded__if" targetRef="Task_no_stock_kept" />
  <bpmn:sequenceFlow id="Flow_Task_record_goods_receipt__Gateway_receipt_recorded__if" sourceRef="Task_record_goods_receipt" targetRef="Gateway_receipt_recorded__if" />
  <bpmn:sequenceFlow id="Flow_Task_record_return__Gateway_receipt_recorded__if" sourceRef="Task_record_return" targetRef="Gateway_receipt_recorded__if" />
  <bpmn:sequenceFlow id="Flow_Task_hand_to_inventory__End_receipt_handed_over" sourceRef="Task_hand_to_inventory" targetRef="End_receipt_handed_over" />
  <bpmn:sequenceFlow id="Flow_Task_no_stock_kept__End_receipt_handed_over" sourceRef="Task_no_stock_kept" targetRef="End_receipt_handed_over" />
 </bpmn:process>
 <bpmndi:BPMNDiagram id="BPMNDiagram_purchasing_v4">
  <bpmndi:BPMNPlane id="BPMNPlane_purchasing_v4" bpmnElement="Collaboration_purchasing_v4">
   <bpmndi:BPMNShape id="Participant_purchasing_receipt_di" bpmnElement="Participant_purchasing_receipt" isHorizontal="true">
    <dc:Bounds x="0" y="0" width="1130" height="520" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_receipt_receiver_di" bpmnElement="Lane_receipt_receiver" isHorizontal="true">
    <dc:Bounds x="30" y="0" width="1100" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Lane_receipt_system_di" bpmnElement="Lane_receipt_system" isHorizontal="true">
    <dc:Bounds x="30" y="260" width="1100" height="260" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Start_receipt_di" bpmnElement="Start_receipt">
    <dc:Bounds x="157" y="42" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_record_goods_receipt_di" bpmnElement="Task_record_goods_receipt">
    <dc:Bounds x="465" y="20" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_record_return_di" bpmnElement="Task_record_return">
    <dc:Bounds x="465" y="140" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_hand_to_inventory_di" bpmnElement="Task_hand_to_inventory">
    <dc:Bounds x="805" y="280" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Task_no_stock_kept_di" bpmnElement="Task_no_stock_kept">
    <dc:Bounds x="805" y="400" width="100" height="80" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_receipt_none__if_di" bpmnElement="Gateway_receipt_none__if">
    <dc:Bounds x="320" y="35" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="Gateway_receipt_recorded__if_di" bpmnElement="Gateway_receipt_recorded__if">
    <dc:Bounds x="660" y="295" width="50" height="50" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNShape id="End_receipt_handed_over_di" bpmnElement="End_receipt_handed_over">
    <dc:Bounds x="1007" y="302" width="36" height="36" />
   </bpmndi:BPMNShape>
   <bpmndi:BPMNEdge id="Flow_Gateway_receipt_none__if__Task_record_goods_receipt_di" bpmnElement="Flow_Gateway_receipt_none__if__Task_record_goods_receipt">
    <di:waypoint x="370" y="60" />
    <di:waypoint x="465" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_receipt_none__if__Task_record_return_di" bpmnElement="Flow_Gateway_receipt_none__if__Task_record_return">
    <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_receipt__Gateway_receipt_none__if_di" bpmnElement="Flow_Start_receipt__Gateway_receipt_none__if">
    <di:waypoint x="193" y="60" />
    <di:waypoint x="320" y="60" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_receipt_recorded__if__Task_hand_to_inventory_di" bpmnElement="Flow_Gateway_receipt_recorded__if__Task_hand_to_inventory">
    <di:waypoint x="710" y="320" />
    <di:waypoint x="805" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Gateway_receipt_recorded__if__Task_no_stock_kept_di" bpmnElement="Flow_Gateway_receipt_recorded__if__Task_no_stock_kept">
    <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_Task_record_goods_receipt__Gateway_receipt_recorded__if_di" bpmnElement="Flow_Task_record_goods_receipt__Gateway_receipt_recorded__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_record_return__Gateway_receipt_recorded__if_di" bpmnElement="Flow_Task_record_return__Gateway_receipt_recorded__if">
    <di:waypoint x="565" y="180" />
    <di:waypoint x="635" y="180" />
    <di:waypoint x="635" y="320" />
    <di:waypoint x="660" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_hand_to_inventory__End_receipt_handed_over_di" bpmnElement="Flow_Task_hand_to_inventory__End_receipt_handed_over">
    <di:waypoint x="905" y="320" />
    <di:waypoint x="1007" y="320" />
   </bpmndi:BPMNEdge>
   <bpmndi:BPMNEdge id="Flow_Task_no_stock_kept__End_receipt_handed_over_di" bpmnElement="Flow_Task_no_stock_kept__End_receipt_handed_over">
    <di:waypoint x="905" y="440" />
    <di:waypoint x="982" y="440" />
    <di:waypoint x="982" y="320" />
    <di:waypoint x="1007" y="320" />
   </bpmndi:BPMNEdge>
  </bpmndi:BPMNPlane>
 </bpmndi:BPMNDiagram>
</bpmn:definitions>