dodil/erp-method
modules/tax/process.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_tax_v1" name="Tax (VAT) processes" targetNamespace="https://git.dodil.io/dodil/erp-platform/processes" exporter="erp-platform erp-compose bpmn" exporterVersion="1">
<bpmn:collaboration id="Collaboration_tax_v1">
<bpmn:documentation>Tax (VAT): one pool per entity lifecycle, generated from module.yaml.</bpmn:documentation>
<bpmn:participant id="Participant_tax_registration" name="Registration" processRef="Process_tax_registration_v1" />
<bpmn:participant id="Participant_tax_tax_code" name="Tax code" processRef="Process_tax_tax_code_v1" />
<bpmn:participant id="Participant_tax_document_tax" name="Document tax" processRef="Process_tax_document_tax_v1" />
</bpmn:collaboration>
<bpmn:process id="Process_tax_registration_v1" name="Registration" isExecutable="false">
<bpmn:documentation>Lifecycle of the registration, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: not_registered, registered, deregistered.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_registration">
<bpmn:lane id="Lane_registration_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
<bpmn:flowNodeRef>Start_registration</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_record_not_registered</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_register</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_record_registered</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_deregister</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_registration_none__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_registration_deregistered</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_registration" name="Registration needed">
<bpmn:outgoing>Flow_Start_registration__Gateway_registration_none__if</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:userTask id="Task_record_not_registered" name="Record that we are not registered" dodil:step="record_not_registered">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From none to not_registered. Effect: documents charge no VAT and are not titled VAT invoice.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_registration_none__if__Task_record_not_registered</bpmn:incoming>
<bpmn:outgoing>Flow_Task_record_not_registered__Task_register</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_register" name="Record our VAT registration" dodil:step="register">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From not_registered to registered. When: a VAT number and an effective date. Requires: vat_number. Effect: tax points from that date charge VAT.</bpmn:documentation>
<bpmn:incoming>Flow_Task_record_not_registered__Task_register</bpmn:incoming>
<bpmn:outgoing>Flow_Task_register__Task_deregister</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_record_registered" name="Record an existing registration" dodil:step="record_registered">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From none to registered. Requires: vat_number.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_registration_none__if__Task_record_registered</bpmn:incoming>
<bpmn:outgoing>Flow_Task_record_registered__Task_deregister</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_deregister" name="Record deregistration" dodil:step="deregister" dodil:approval="true">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From registered to deregistered. Requires: effective_date. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Task_register__Task_deregister</bpmn:incoming>
<bpmn:incoming>Flow_Task_record_registered__Task_deregister</bpmn:incoming>
<bpmn:outgoing>Flow_Task_deregister__End_registration_deregistered</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_registration_none__if" name="New registration?">
<bpmn:incoming>Flow_Start_registration__Gateway_registration_none__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_registration_none__if__Task_record_not_registered</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_registration_none__if__Task_record_registered</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_registration_deregistered" name="Registration deregistered">
<bpmn:incoming>Flow_Task_deregister__End_registration_deregistered</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Gateway_registration_none__if__Task_record_not_registered" sourceRef="Gateway_registration_none__if" targetRef="Task_record_not_registered" />
<bpmn:sequenceFlow id="Flow_Gateway_registration_none__if__Task_record_registered" sourceRef="Gateway_registration_none__if" targetRef="Task_record_registered" />
<bpmn:sequenceFlow id="Flow_Start_registration__Gateway_registration_none__if" sourceRef="Start_registration" targetRef="Gateway_registration_none__if" />
<bpmn:sequenceFlow id="Flow_Task_record_not_registered__Task_register" sourceRef="Task_record_not_registered" targetRef="Task_register" />
<bpmn:sequenceFlow id="Flow_Task_register__Task_deregister" sourceRef="Task_register" targetRef="Task_deregister" />
<bpmn:sequenceFlow id="Flow_Task_record_registered__Task_deregister" sourceRef="Task_record_registered" targetRef="Task_deregister" />
<bpmn:sequenceFlow id="Flow_Task_deregister__End_registration_deregistered" sourceRef="Task_deregister" targetRef="End_registration_deregistered" />
</bpmn:process>
<bpmn:process id="Process_tax_tax_code_v1" name="Tax code" isExecutable="false">
<bpmn:documentation>Lifecycle of the tax code, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: draft, active, retired.</bpmn:documentation>
<bpmn:laneSet id="LaneSet_tax_code">
<bpmn:lane id="Lane_tax_code_system" name="The system">
<bpmn:flowNodeRef>Start_tax_code</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_load_pack</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_tax_code_none__if</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_tax_code_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
<bpmn:flowNodeRef>Task_add_code</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_activate_code</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_schedule_rate</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_retire_code</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_tax_code_retired</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_tax_code" name="Tax code needed">
<bpmn:outgoing>Flow_Start_tax_code__Gateway_tax_code_none__if</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:serviceTask id="Task_load_pack" name="Load the country's codes" dodil:step="load_pack" implementation="##unspecified">
<bpmn:documentation>By: The system. From none to draft. When: a new installation. Effect: the UK pack: S, R, Z, E, OS, RC, NV.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_tax_code_none__if__Task_load_pack</bpmn:incoming>
<bpmn:outgoing>Flow_Task_load_pack__Task_activate_code</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_add_code" name="Add a tax code" dodil:step="add_code">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From none to draft.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_tax_code_none__if__Task_add_code</bpmn:incoming>
<bpmn:outgoing>Flow_Task_add_code__Task_activate_code</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_activate_code" name="Activate the code" dodil:step="activate_code">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From draft to active. When: a treatment, a rate from a date, and the document wording where the treatment needs one (reverse charge).</bpmn:documentation>
<bpmn:incoming>Flow_Task_load_pack__Task_activate_code</bpmn:incoming>
<bpmn:incoming>Flow_Task_add_code__Task_activate_code</bpmn:incoming>
<bpmn:outgoing>Flow_Task_activate_code__Task_schedule_rate</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_schedule_rate" name="Schedule a rate change" dodil:step="schedule_rate" dodil:approval="true">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From active to active. Effect: a dated rate row; issued documents unchanged. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Task_activate_code__Task_schedule_rate</bpmn:incoming>
<bpmn:outgoing>Flow_Task_schedule_rate__Task_retire_code</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_retire_code" name="Retire the code" dodil:step="retire_code">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From active to retired. When: no rule still points at it. Effect: no new determinations; documents keep it.</bpmn:documentation>
<bpmn:incoming>Flow_Task_schedule_rate__Task_retire_code</bpmn:incoming>
<bpmn:outgoing>Flow_Task_retire_code__End_tax_code_retired</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="Gateway_tax_code_none__if" name="New tax code?">
<bpmn:incoming>Flow_Start_tax_code__Gateway_tax_code_none__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_tax_code_none__if__Task_load_pack</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_tax_code_none__if__Task_add_code</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_tax_code_retired" name="Tax code retired">
<bpmn:incoming>Flow_Task_retire_code__End_tax_code_retired</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Gateway_tax_code_none__if__Task_load_pack" sourceRef="Gateway_tax_code_none__if" targetRef="Task_load_pack" />
<bpmn:sequenceFlow id="Flow_Gateway_tax_code_none__if__Task_add_code" sourceRef="Gateway_tax_code_none__if" targetRef="Task_add_code" />
<bpmn:sequenceFlow id="Flow_Start_tax_code__Gateway_tax_code_none__if" sourceRef="Start_tax_code" targetRef="Gateway_tax_code_none__if" />
<bpmn:sequenceFlow id="Flow_Task_load_pack__Task_activate_code" sourceRef="Task_load_pack" targetRef="Task_activate_code" />
<bpmn:sequenceFlow id="Flow_Task_add_code__Task_activate_code" sourceRef="Task_add_code" targetRef="Task_activate_code" />
<bpmn:sequenceFlow id="Flow_Task_schedule_rate__Task_retire_code" sourceRef="Task_schedule_rate" targetRef="Task_retire_code" />
<bpmn:sequenceFlow id="Flow_Task_activate_code__Task_schedule_rate" sourceRef="Task_activate_code" targetRef="Task_schedule_rate" />
<bpmn:sequenceFlow id="Flow_Task_retire_code__End_tax_code_retired" sourceRef="Task_retire_code" targetRef="End_tax_code_retired" />
</bpmn:process>
<bpmn:process id="Process_tax_document_tax_v1" name="Document tax" isExecutable="false">
<bpmn:documentation>Lifecycle of the document tax, generated from module.yaml by erp-compose bpmn; change the workflow there, not this file. States: computed, frozen. Note: the document (an order, an invoice, a credit note) owns its own copy of the result; this lifecycle is the tax on it</bpmn:documentation>
<bpmn:laneSet id="LaneSet_document_tax">
<bpmn:lane id="Lane_document_tax_system" name="The system">
<bpmn:flowNodeRef>Start_document_tax</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_determine</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_ai_suggest_code</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_check_contents</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Task_freeze</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_ai_suggest_code__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_ai_suggest_code__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_check_contents__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_check_contents__if_end</bpmn:flowNodeRef>
<bpmn:flowNodeRef>End_document_tax_frozen</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_document_tax_biller" name="Whoever raises orders and invoices">
<bpmn:flowNodeRef>Task_override_line</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_override_line__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_override_line__if_end</bpmn:flowNodeRef>
</bpmn:lane>
<bpmn:lane id="Lane_document_tax_tax_admin" name="Whoever is responsible for VAT (the owner, the bookkeeper, the accountant)">
<bpmn:flowNodeRef>Task_approve_override</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_approve_override__if</bpmn:flowNodeRef>
<bpmn:flowNodeRef>Gateway_approve_override__if_end</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:startEvent id="Start_document_tax" name="Document tax needed">
<bpmn:outgoing>Flow_Start_document_tax__Task_determine</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:serviceTask id="Task_determine" name="Determine each line's code" dodil:step="determine" implementation="##unspecified">
<bpmn:documentation>By: The system. From none to computed. When: a rule covers every (category, treatment) pair. Effect: code, rate, VAT per line; the per-rate summary; the total.</bpmn:documentation>
<bpmn:incoming>Flow_Start_document_tax__Task_determine</bpmn:incoming>
<bpmn:outgoing>Flow_Task_determine__Gateway_ai_suggest_code__if</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_ai_suggest_code" name="AI suggests a code for a line no rule covers (suggest)" dodil:step="ai_suggest_code" implementation="##unspecified">
<bpmn:documentation>By: The system. From computed to computed. When: a line has no rule, or no product. Effect: a proposed code with its reason; a person chooses.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_ai_suggest_code__if__Task_ai_suggest_code</bpmn:incoming>
<bpmn:outgoing>Flow_Task_ai_suggest_code__Gateway_ai_suggest_code__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:userTask id="Task_override_line" name="Override a line's code" dodil:step="override_line">
<bpmn:documentation>By: Whoever raises orders and invoices. From computed to computed. When: the biller disagrees with the rule's code. Requires: reason.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_override_line__if__Task_override_line</bpmn:incoming>
<bpmn:outgoing>Flow_Task_override_line__Gateway_override_line__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_approve_override" name="Approve an override that lowers tax" dodil:step="approve_override" dodil:approval="true">
<bpmn:documentation>By: Whoever is responsible for VAT (the owner, the bookkeeper, the accountant). From computed to computed. When: an override lowers the tax. An approval.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_approve_override__if__Task_approve_override</bpmn:incoming>
<bpmn:outgoing>Flow_Task_approve_override__Gateway_approve_override__if_end</bpmn:outgoing>
</bpmn:userTask>
<bpmn:serviceTask id="Task_check_contents" name="Check the invoice contents" dodil:step="check_contents" implementation="##unspecified">
<bpmn:documentation>By: The system. From computed to computed. When: the document is about to issue. Effect: missing[] per para 16.3.1, or nothing.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_check_contents__if__Task_check_contents</bpmn:incoming>
<bpmn:outgoing>Flow_Task_check_contents__Gateway_check_contents__if_end</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="Task_freeze" name="Freeze the tax at issue" dodil:step="freeze" implementation="##unspecified">
<bpmn:documentation>By: The system. From computed to frozen. When: the document issued. Effect: never recomputed.</bpmn:documentation>
<bpmn:incoming>Flow_Gateway_check_contents__if_end__Task_freeze</bpmn:incoming>
<bpmn:outgoing>Flow_Task_freeze__End_document_tax_frozen</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:exclusiveGateway id="Gateway_ai_suggest_code__if" name="a line has no rule, or no product?">
<bpmn:incoming>Flow_Task_determine__Gateway_ai_suggest_code__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_ai_suggest_code__if__Task_ai_suggest_code</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_ai_suggest_code__if__Gateway_ai_suggest_code__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_ai_suggest_code__if_end">
<bpmn:incoming>Flow_Gateway_ai_suggest_code__if__Gateway_ai_suggest_code__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_ai_suggest_code__Gateway_ai_suggest_code__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_ai_suggest_code__if_end__Gateway_override_line__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_override_line__if" name="the biller disagrees with the rule's code?">
<bpmn:incoming>Flow_Gateway_ai_suggest_code__if_end__Gateway_override_line__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_override_line__if__Task_override_line</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_override_line__if__Gateway_override_line__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_override_line__if_end">
<bpmn:incoming>Flow_Gateway_override_line__if__Gateway_override_line__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_override_line__Gateway_override_line__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_override_line__if_end__Gateway_approve_override__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_approve_override__if" name="an override lowers the tax?">
<bpmn:incoming>Flow_Gateway_override_line__if_end__Gateway_approve_override__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_approve_override__if__Task_approve_override</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_approve_override__if__Gateway_approve_override__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_approve_override__if_end">
<bpmn:incoming>Flow_Gateway_approve_override__if__Gateway_approve_override__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_approve_override__Gateway_approve_override__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_approve_override__if_end__Gateway_check_contents__if</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_check_contents__if" name="the document is about to issue?">
<bpmn:incoming>Flow_Gateway_approve_override__if_end__Gateway_check_contents__if</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_check_contents__if__Task_check_contents</bpmn:outgoing>
<bpmn:outgoing>Flow_Gateway_check_contents__if__Gateway_check_contents__if_end</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:exclusiveGateway id="Gateway_check_contents__if_end">
<bpmn:incoming>Flow_Gateway_check_contents__if__Gateway_check_contents__if_end</bpmn:incoming>
<bpmn:incoming>Flow_Task_check_contents__Gateway_check_contents__if_end</bpmn:incoming>
<bpmn:outgoing>Flow_Gateway_check_contents__if_end__Task_freeze</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="End_document_tax_frozen" name="Document tax frozen">
<bpmn:incoming>Flow_Task_freeze__End_document_tax_frozen</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="Flow_Start_document_tax__Task_determine" sourceRef="Start_document_tax" targetRef="Task_determine" />
<bpmn:sequenceFlow id="Flow_Gateway_ai_suggest_code__if__Task_ai_suggest_code" name="a line has no rule, or no product" sourceRef="Gateway_ai_suggest_code__if" targetRef="Task_ai_suggest_code" />
<bpmn:sequenceFlow id="Flow_Gateway_ai_suggest_code__if__Gateway_ai_suggest_code__if_end" name="otherwise" sourceRef="Gateway_ai_suggest_code__if" targetRef="Gateway_ai_suggest_code__if_end" />
<bpmn:sequenceFlow id="Flow_Task_ai_suggest_code__Gateway_ai_suggest_code__if_end" sourceRef="Task_ai_suggest_code" targetRef="Gateway_ai_suggest_code__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_override_line__if__Task_override_line" name="the biller disagrees with the rule's code" sourceRef="Gateway_override_line__if" targetRef="Task_override_line" />
<bpmn:sequenceFlow id="Flow_Gateway_override_line__if__Gateway_override_line__if_end" name="otherwise" sourceRef="Gateway_override_line__if" targetRef="Gateway_override_line__if_end" />
<bpmn:sequenceFlow id="Flow_Task_override_line__Gateway_override_line__if_end" sourceRef="Task_override_line" targetRef="Gateway_override_line__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_approve_override__if__Task_approve_override" name="an override lowers the tax" sourceRef="Gateway_approve_override__if" targetRef="Task_approve_override" />
<bpmn:sequenceFlow id="Flow_Gateway_approve_override__if__Gateway_approve_override__if_end" name="otherwise" sourceRef="Gateway_approve_override__if" targetRef="Gateway_approve_override__if_end" />
<bpmn:sequenceFlow id="Flow_Task_approve_override__Gateway_approve_override__if_end" sourceRef="Task_approve_override" targetRef="Gateway_approve_override__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_check_contents__if__Task_check_contents" name="the document is about to issue" sourceRef="Gateway_check_contents__if" targetRef="Task_check_contents" />
<bpmn:sequenceFlow id="Flow_Gateway_check_contents__if__Gateway_check_contents__if_end" name="otherwise" sourceRef="Gateway_check_contents__if" targetRef="Gateway_check_contents__if_end" />
<bpmn:sequenceFlow id="Flow_Task_check_contents__Gateway_check_contents__if_end" sourceRef="Task_check_contents" targetRef="Gateway_check_contents__if_end" />
<bpmn:sequenceFlow id="Flow_Gateway_ai_suggest_code__if_end__Gateway_override_line__if" sourceRef="Gateway_ai_suggest_code__if_end" targetRef="Gateway_override_line__if" />
<bpmn:sequenceFlow id="Flow_Gateway_override_line__if_end__Gateway_approve_override__if" sourceRef="Gateway_override_line__if_end" targetRef="Gateway_approve_override__if" />
<bpmn:sequenceFlow id="Flow_Gateway_approve_override__if_end__Gateway_check_contents__if" sourceRef="Gateway_approve_override__if_end" targetRef="Gateway_check_contents__if" />
<bpmn:sequenceFlow id="Flow_Gateway_check_contents__if_end__Task_freeze" sourceRef="Gateway_check_contents__if_end" targetRef="Task_freeze" />
<bpmn:sequenceFlow id="Flow_Task_determine__Gateway_ai_suggest_code__if" sourceRef="Task_determine" targetRef="Gateway_ai_suggest_code__if" />
<bpmn:sequenceFlow id="Flow_Task_freeze__End_document_tax_frozen" sourceRef="Task_freeze" targetRef="End_document_tax_frozen" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_tax_v1">
<bpmndi:BPMNPlane id="BPMNPlane_tax_v1" bpmnElement="Collaboration_tax_v1">
<bpmndi:BPMNShape id="Participant_tax_registration_di" bpmnElement="Participant_tax_registration" isHorizontal="true">
<dc:Bounds x="0" y="0" width="960" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_registration_tax_admin_di" bpmnElement="Lane_registration_tax_admin" isHorizontal="true">
<dc:Bounds x="30" y="0" width="930" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_registration_di" bpmnElement="Start_registration">
<dc:Bounds x="157" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_record_not_registered_di" bpmnElement="Task_record_not_registered">
<dc:Bounds x="465" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_register_di" bpmnElement="Task_register">
<dc:Bounds x="635" y="20" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_record_registered_di" bpmnElement="Task_record_registered">
<dc:Bounds x="465" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_deregister_di" bpmnElement="Task_deregister">
<dc:Bounds x="635" y="140" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_registration_none__if_di" bpmnElement="Gateway_registration_none__if">
<dc:Bounds x="320" y="35" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_registration_deregistered_di" bpmnElement="End_registration_deregistered">
<dc:Bounds x="837" y="42" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Gateway_registration_none__if__Task_record_not_registered_di" bpmnElement="Flow_Gateway_registration_none__if__Task_record_not_registered">
<di:waypoint x="370" y="60" />
<di:waypoint x="465" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_registration_none__if__Task_record_registered_di" bpmnElement="Flow_Gateway_registration_none__if__Task_record_registered">
<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_registration__Gateway_registration_none__if_di" bpmnElement="Flow_Start_registration__Gateway_registration_none__if">
<di:waypoint x="193" y="60" />
<di:waypoint x="320" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_record_not_registered__Task_register_di" bpmnElement="Flow_Task_record_not_registered__Task_register">
<di:waypoint x="565" y="60" />
<di:waypoint x="635" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_register__Task_deregister_di" bpmnElement="Flow_Task_register__Task_deregister">
<di:waypoint x="685" y="100" />
<di:waypoint x="685" y="235" />
<di:waypoint x="685" y="235" />
<di:waypoint x="685" y="220" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_record_registered__Task_deregister_di" bpmnElement="Flow_Task_record_registered__Task_deregister">
<di:waypoint x="565" y="180" />
<di:waypoint x="635" y="180" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_deregister__End_registration_deregistered_di" bpmnElement="Flow_Task_deregister__End_registration_deregistered">
<di:waypoint x="735" y="180" />
<di:waypoint x="812" y="180" />
<di:waypoint x="812" y="60" />
<di:waypoint x="837" y="60" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_tax_tax_code_di" bpmnElement="Participant_tax_tax_code" isHorizontal="true">
<dc:Bounds x="0" y="300" width="1300" height="280" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_tax_code_system_di" bpmnElement="Lane_tax_code_system" isHorizontal="true">
<dc:Bounds x="30" y="300" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_tax_code_tax_admin_di" bpmnElement="Lane_tax_code_tax_admin" isHorizontal="true">
<dc:Bounds x="30" y="440" width="1270" height="140" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_tax_code_di" bpmnElement="Start_tax_code">
<dc:Bounds x="157" y="342" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_load_pack_di" bpmnElement="Task_load_pack">
<dc:Bounds x="465" y="320" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_add_code_di" bpmnElement="Task_add_code">
<dc:Bounds x="465" y="460" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_activate_code_di" bpmnElement="Task_activate_code">
<dc:Bounds x="635" y="460" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_schedule_rate_di" bpmnElement="Task_schedule_rate">
<dc:Bounds x="805" y="460" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_retire_code_di" bpmnElement="Task_retire_code">
<dc:Bounds x="975" y="460" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_tax_code_none__if_di" bpmnElement="Gateway_tax_code_none__if">
<dc:Bounds x="320" y="335" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_tax_code_retired_di" bpmnElement="End_tax_code_retired">
<dc:Bounds x="1177" y="482" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Gateway_tax_code_none__if__Task_load_pack_di" bpmnElement="Flow_Gateway_tax_code_none__if__Task_load_pack">
<di:waypoint x="370" y="360" />
<di:waypoint x="465" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_tax_code_none__if__Task_add_code_di" bpmnElement="Flow_Gateway_tax_code_none__if__Task_add_code">
<di:waypoint x="370" y="360" />
<di:waypoint x="440" y="360" />
<di:waypoint x="440" y="500" />
<di:waypoint x="465" y="500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Start_tax_code__Gateway_tax_code_none__if_di" bpmnElement="Flow_Start_tax_code__Gateway_tax_code_none__if">
<di:waypoint x="193" y="360" />
<di:waypoint x="320" y="360" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_load_pack__Task_activate_code_di" bpmnElement="Flow_Task_load_pack__Task_activate_code">
<di:waypoint x="565" y="360" />
<di:waypoint x="610" y="360" />
<di:waypoint x="610" y="500" />
<di:waypoint x="635" y="500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_add_code__Task_activate_code_di" bpmnElement="Flow_Task_add_code__Task_activate_code">
<di:waypoint x="565" y="500" />
<di:waypoint x="635" y="500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_schedule_rate__Task_retire_code_di" bpmnElement="Flow_Task_schedule_rate__Task_retire_code">
<di:waypoint x="905" y="500" />
<di:waypoint x="975" y="500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_activate_code__Task_schedule_rate_di" bpmnElement="Flow_Task_activate_code__Task_schedule_rate">
<di:waypoint x="735" y="500" />
<di:waypoint x="805" y="500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_retire_code__End_tax_code_retired_di" bpmnElement="Flow_Task_retire_code__End_tax_code_retired">
<di:waypoint x="1075" y="500" />
<di:waypoint x="1177" y="500" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_tax_document_tax_di" bpmnElement="Participant_tax_document_tax" isHorizontal="true">
<dc:Bounds x="0" y="620" width="2150" height="780" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_document_tax_system_di" bpmnElement="Lane_document_tax_system" isHorizontal="true">
<dc:Bounds x="30" y="620" width="2120" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_document_tax_biller_di" bpmnElement="Lane_document_tax_biller" isHorizontal="true">
<dc:Bounds x="30" y="880" width="2120" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_document_tax_tax_admin_di" bpmnElement="Lane_document_tax_tax_admin" isHorizontal="true">
<dc:Bounds x="30" y="1140" width="2120" height="260" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Start_document_tax_di" bpmnElement="Start_document_tax">
<dc:Bounds x="157" y="662" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_determine_di" bpmnElement="Task_determine">
<dc:Bounds x="295" y="640" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_ai_suggest_code_di" bpmnElement="Task_ai_suggest_code">
<dc:Bounds x="635" y="640" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_override_line_di" bpmnElement="Task_override_line">
<dc:Bounds x="975" y="900" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_approve_override_di" bpmnElement="Task_approve_override">
<dc:Bounds x="1315" y="1160" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_check_contents_di" bpmnElement="Task_check_contents">
<dc:Bounds x="1655" y="640" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_freeze_di" bpmnElement="Task_freeze">
<dc:Bounds x="1825" y="640" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_ai_suggest_code__if_di" bpmnElement="Gateway_ai_suggest_code__if">
<dc:Bounds x="490" y="655" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_ai_suggest_code__if_end_di" bpmnElement="Gateway_ai_suggest_code__if_end">
<dc:Bounds x="660" y="775" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_override_line__if_di" bpmnElement="Gateway_override_line__if">
<dc:Bounds x="830" y="915" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_override_line__if_end_di" bpmnElement="Gateway_override_line__if_end">
<dc:Bounds x="1000" y="1035" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_approve_override__if_di" bpmnElement="Gateway_approve_override__if">
<dc:Bounds x="1170" y="1175" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_approve_override__if_end_di" bpmnElement="Gateway_approve_override__if_end">
<dc:Bounds x="1340" y="1295" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_check_contents__if_di" bpmnElement="Gateway_check_contents__if">
<dc:Bounds x="1510" y="655" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Gateway_check_contents__if_end_di" bpmnElement="Gateway_check_contents__if_end">
<dc:Bounds x="1680" y="775" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="End_document_tax_frozen_di" bpmnElement="End_document_tax_frozen">
<dc:Bounds x="2027" y="662" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="Flow_Start_document_tax__Task_determine_di" bpmnElement="Flow_Start_document_tax__Task_determine">
<di:waypoint x="193" y="680" />
<di:waypoint x="295" y="680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_ai_suggest_code__if__Task_ai_suggest_code_di" bpmnElement="Flow_Gateway_ai_suggest_code__if__Task_ai_suggest_code">
<di:waypoint x="540" y="680" />
<di:waypoint x="635" y="680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_ai_suggest_code__if__Gateway_ai_suggest_code__if_end_di" bpmnElement="Flow_Gateway_ai_suggest_code__if__Gateway_ai_suggest_code__if_end">
<di:waypoint x="540" y="680" />
<di:waypoint x="635" y="680" />
<di:waypoint x="635" y="800" />
<di:waypoint x="660" y="800" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_ai_suggest_code__Gateway_ai_suggest_code__if_end_di" bpmnElement="Flow_Task_ai_suggest_code__Gateway_ai_suggest_code__if_end">
<di:waypoint x="685" y="720" />
<di:waypoint x="685" y="840" />
<di:waypoint x="685" y="840" />
<di:waypoint x="685" y="825" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_override_line__if__Task_override_line_di" bpmnElement="Flow_Gateway_override_line__if__Task_override_line">
<di:waypoint x="880" y="940" />
<di:waypoint x="975" y="940" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_override_line__if__Gateway_override_line__if_end_di" bpmnElement="Flow_Gateway_override_line__if__Gateway_override_line__if_end">
<di:waypoint x="880" y="940" />
<di:waypoint x="975" y="940" />
<di:waypoint x="975" y="1060" />
<di:waypoint x="1000" y="1060" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_override_line__Gateway_override_line__if_end_di" bpmnElement="Flow_Task_override_line__Gateway_override_line__if_end">
<di:waypoint x="1025" y="980" />
<di:waypoint x="1025" y="1106" />
<di:waypoint x="1025" y="1106" />
<di:waypoint x="1025" y="1085" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_approve_override__if__Task_approve_override_di" bpmnElement="Flow_Gateway_approve_override__if__Task_approve_override">
<di:waypoint x="1220" y="1200" />
<di:waypoint x="1315" y="1200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_approve_override__if__Gateway_approve_override__if_end_di" bpmnElement="Flow_Gateway_approve_override__if__Gateway_approve_override__if_end">
<di:waypoint x="1220" y="1200" />
<di:waypoint x="1315" y="1200" />
<di:waypoint x="1315" y="1320" />
<di:waypoint x="1340" y="1320" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_approve_override__Gateway_approve_override__if_end_di" bpmnElement="Flow_Task_approve_override__Gateway_approve_override__if_end">
<di:waypoint x="1365" y="1240" />
<di:waypoint x="1365" y="1372" />
<di:waypoint x="1365" y="1372" />
<di:waypoint x="1365" y="1345" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_check_contents__if__Task_check_contents_di" bpmnElement="Flow_Gateway_check_contents__if__Task_check_contents">
<di:waypoint x="1560" y="680" />
<di:waypoint x="1655" y="680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_check_contents__if__Gateway_check_contents__if_end_di" bpmnElement="Flow_Gateway_check_contents__if__Gateway_check_contents__if_end">
<di:waypoint x="1560" y="680" />
<di:waypoint x="1655" y="680" />
<di:waypoint x="1655" y="800" />
<di:waypoint x="1680" y="800" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_check_contents__Gateway_check_contents__if_end_di" bpmnElement="Flow_Task_check_contents__Gateway_check_contents__if_end">
<di:waypoint x="1705" y="720" />
<di:waypoint x="1705" y="858" />
<di:waypoint x="1705" y="858" />
<di:waypoint x="1705" y="825" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_ai_suggest_code__if_end__Gateway_override_line__if_di" bpmnElement="Flow_Gateway_ai_suggest_code__if_end__Gateway_override_line__if">
<di:waypoint x="710" y="800" />
<di:waypoint x="805" y="800" />
<di:waypoint x="805" y="940" />
<di:waypoint x="830" y="940" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_override_line__if_end__Gateway_approve_override__if_di" bpmnElement="Flow_Gateway_override_line__if_end__Gateway_approve_override__if">
<di:waypoint x="1050" y="1060" />
<di:waypoint x="1145" y="1060" />
<di:waypoint x="1145" y="1200" />
<di:waypoint x="1170" y="1200" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_approve_override__if_end__Gateway_check_contents__if_di" bpmnElement="Flow_Gateway_approve_override__if_end__Gateway_check_contents__if">
<di:waypoint x="1390" y="1320" />
<di:waypoint x="1485" y="1320" />
<di:waypoint x="1485" y="680" />
<di:waypoint x="1510" y="680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Gateway_check_contents__if_end__Task_freeze_di" bpmnElement="Flow_Gateway_check_contents__if_end__Task_freeze">
<di:waypoint x="1730" y="800" />
<di:waypoint x="1800" y="800" />
<di:waypoint x="1800" y="680" />
<di:waypoint x="1825" y="680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_determine__Gateway_ai_suggest_code__if_di" bpmnElement="Flow_Task_determine__Gateway_ai_suggest_code__if">
<di:waypoint x="395" y="680" />
<di:waypoint x="490" y="680" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="Flow_Task_freeze__End_document_tax_frozen_di" bpmnElement="Flow_Task_freeze__End_document_tax_frozen">
<di:waypoint x="1925" y="680" />
<di:waypoint x="2027" y="680" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>