dodil/erp-method
modules/expenses/signoff/expenses/expenses_card_txn.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_expenses_v2" name="Expenses processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_expenses_v2">
<bpmn:documentation>Expenses: one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_expenses_card_txn" name="Card txn" processRef="Process_expenses_card_txn_v2" />
</bpmn:collaboration>
<bpmn:process id="Process_expenses_card_txn_v2" name="Card txn" isExecutable="false">
<bpmn:documentation>Lifecycle of the card txn, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: imported, matched, personal, recovered.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_card_txn">
<bpmn:lane id="Lane_card_txn_system" name="The system">
<bpmn:flowNodeRef>Start_card_txn</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_import_card_txn</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_recover_personal</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_card_txn_recovered</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_card_txn_employee" name="Anyone who spends money for work">
<bpmn:flowNodeRef>Task_match_card_txn</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_mark_personal</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_unmatch_card_txn</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_card_txn_imported__if</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_card_txn" name="Card txn needed">
<bpmn:outgoing>Flow_Start_card_txn__Task_import_card_txn</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:serviceTask id="Task_import_card_txn" name="Imported from the feed" dodil:step="import_card_txn" implementation="##unspecified">
<bpmn:documentation>By: The system. From none to imported. When: the feed's total equals its lines; the card has a holder.</bpmn:documentation>
<bpmn:incoming>Flow_Start_card_txn__Task_import_card_txn</bpmn:incoming>
<bpmn:outgoing>Flow_Task_import_card_txn__Gateway_card_txn_imported__if</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_match_card_txn" name="Match to a claim line" dodil:step="match_card_txn">
<bpmn:documentation>By: Anyone who spends money for work. From imported to matched. When: the line unmatched; the same currency billed. Effect: the line's amount becomes the billed amount.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_card_txn_imported__if__Task_match_card_txn</bpmn:incoming>
<bpmn:outgoing>Flow_Task_match_card_txn__Task_unmatch_card_txn</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_mark_personal" name="Mark as personal" dodil:step="mark_personal">
<bpmn:documentation>By: Anyone who spends money for work. From imported to personal. Effect: recovery journal posted (EXP-14).</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_card_txn_imported__if__Task_mark_personal</bpmn:incoming>
<bpmn:outgoing>Flow_Task_mark_personal__Task_recover_personal</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_unmatch_card_txn" name="Undo the match" dodil:step="unmatch_card_txn">
<bpmn:documentation>By: Anyone who spends money for work or Expenses accountant. From matched to imported. When: the matched line's claim is a draft (claim_is_draft). Effect: v2 (EXP-25): the line's amount returns to what was typed; the match kept in the transaction's history.</bpmn:documentation>
<bpmn:incoming>Flow_Task_match_card_txn__Task_unmatch_card_txn</bpmn:incoming>
<bpmn:outgoing>Flow_Task_unmatch_card_txn__Gateway_card_txn_imported__if</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_recover_personal" name="Recovered" dodil:step="recover_personal" implementation="##unspecified">
<bpmn:documentation>By: The system. From personal to recovered. When: netted from a payout or repaid in payments (one claim row decides).</bpmn:documentation>
<bpmn:incoming>Flow_Task_mark_personal__Task_recover_personal</bpmn:incoming>
<bpmn:outgoing>Flow_Task_recover_personal__End_card_txn_recovered</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_card_txn_imported__if" name="Card txn imported: what next?">
<bpmn:incoming>Flow_Task_import_card_txn__Gateway_card_txn_imported__if</bpmn:incoming>
<bpmn:incoming>Flow_Task_unmatch_card_txn__Gateway_card_txn_imported__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_card_txn_imported__if__Task_match_card_txn</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_card_txn_imported__if__Task_mark_personal</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_card_txn_recovered" name="Card txn recovered">
<bpmn:incoming>Flow_Task_recover_personal__End_card_txn_recovered</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Start_card_txn__Task_import_card_txn" sourceRef="Start_card_txn" targetRef="Task_import_card_txn" />
<bpmn:sequenceFlow id="Flow_Gateway_card_txn_imported__if__Task_match_card_txn" sourceRef="Gateway_card_txn_imported__if" targetRef="Task_match_card_txn" />
<bpmn:sequenceFlow id="Flow_Gateway_card_txn_imported__if__Task_mark_personal" sourceRef="Gateway_card_txn_imported__if" targetRef="Task_mark_personal" />
<bpmn:sequenceFlow id="Flow_Task_import_card_txn__Gateway_card_txn_imported__if" sourceRef="Task_import_card_txn" targetRef="Gateway_card_txn_imported__if" />
<bpmn:sequenceFlow id="Flow_Task_match_card_txn__Task_unmatch_card_txn" sourceRef="Task_match_card_txn" targetRef="Task_unmatch_card_txn" />
<bpmn:sequenceFlow id="Flow_Task_mark_personal__Task_recover_personal" sourceRef="Task_mark_personal" targetRef="Task_recover_personal" />
<bpmn:sequenceFlow id="Flow_Task_unmatch_card_txn__Gateway_card_txn_imported__if" sourceRef="Task_unmatch_card_txn" targetRef="Gateway_card_txn_imported__if" />
<bpmn:sequenceFlow id="Flow_Task_recover_personal__End_card_txn_recovered" sourceRef="Task_recover_personal" targetRef="End_card_txn_recovered" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_expenses_v2">
<bpmndi:BPMNPlane id="BPMNPlane_expenses_v2" bpmnElement="Collaboration_expenses_v2">
<bpmndi:BPMNShape id="Participant_expenses_card_txn_di" bpmnElement="Participant_expenses_card_txn" isHorizontal="true">
<dc:Bounds x="0" y="0" width="1130" height="400" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_card_txn_system_di" bpmnElement="Lane_card_txn_system" isHorizontal="true">
<dc:Bounds x="30" y="0" width="1100" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_card_txn_employee_di" bpmnElement="Lane_card_txn_employee" isHorizontal="true">
<dc:Bounds x="30" y="140" width="1100" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_card_txn_di" bpmnElement="Start_card_txn">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_import_card_txn_di" bpmnElement="Task_import_card_txn">
<dc:Bounds x="295" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_match_card_txn_di" bpmnElement="Task_match_card_txn">
<dc:Bounds x="635" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_mark_personal_di" bpmnElement="Task_mark_personal">
<dc:Bounds x="635" y="280" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_unmatch_card_txn_di" bpmnElement="Task_unmatch_card_txn">
<dc:Bounds x="805" y="160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_recover_personal_di" bpmnElement="Task_recover_personal">
<dc:Bounds x="805" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_card_txn_imported__if_di" bpmnElement="Gateway_card_txn_imported__if">
<dc:Bounds x="490" y="175" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_card_txn_recovered_di" bpmnElement="End_card_txn_recovered">
<dc:Bounds x="1007" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Start_card_txn__Task_import_card_txn_di" bpmnElement="Flow_Start_card_txn__Task_import_card_txn">
<di:waypoint x="193" y="60" />
<di:waypoint x="295" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_card_txn_imported__if__Task_match_card_txn_di" bpmnElement="Flow_Gateway_card_txn_imported__if__Task_match_card_txn">
<di:waypoint x="540" y="200" />
<di:waypoint x="635" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_card_txn_imported__if__Task_mark_personal_di" bpmnElement="Flow_Gateway_card_txn_imported__if__Task_mark_personal">
<di:waypoint x="540" y="200" />
<di:waypoint x="610" y="200" />
<di:waypoint x="610" y="320" />
<di:waypoint x="635" y="320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_import_card_txn__Gateway_card_txn_imported__if_di" bpmnElement="Flow_Task_import_card_txn__Gateway_card_txn_imported__if">
<di:waypoint x="395" y="60" />
<di:waypoint x="465" y="60" />
<di:waypoint x="465" y="200" />
<di:waypoint x="490" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_match_card_txn__Task_unmatch_card_txn_di" bpmnElement="Flow_Task_match_card_txn__Task_unmatch_card_txn">
<di:waypoint x="735" y="200" />
<di:waypoint x="805" y="200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_mark_personal__Task_recover_personal_di" bpmnElement="Flow_Task_mark_personal__Task_recover_personal">
<di:waypoint x="735" 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_unmatch_card_txn__Gateway_card_txn_imported__if_di" bpmnElement="Flow_Task_unmatch_card_txn__Gateway_card_txn_imported__if">
<di:waypoint x="855" y="240" />
<di:waypoint x="855" y="255" />
<di:waypoint x="515" y="255" />
<di:waypoint x="515" y="225" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_recover_personal__End_card_txn_recovered_di" bpmnElement="Flow_Task_recover_personal__End_card_txn_recovered">
<di:waypoint x="905" y="60" />
<di:waypoint x="1007" y="60" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>