<?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" id="Definitions_happy_path" targetNamespace="https://www.analystengineering.com/iso-20022/payment-process-bpmn" exporter="Analyst Engineering" exporterVersion="1.0">
  <bpmn:collaboration id="Collaboration_1">
    <bpmn:documentation>Happy path: settled and credited. The debtor sends a pain.001, the debtor agent validates and debits, the pacs.008 crosses the CSM to the creditor agent, which accepts with a pacs.002 ACCP; the CSM settles and confirms ACSC to both agents, the creditor is credited and the debtor receives pain.002 ACSC. Source: https://www.analystengineering.com/iso-20022/payment-process-bpmn#happy-path</bpmn:documentation>
    <bpmn:participant id="Participant_debtor" name="Debtor (customer who pays)" />
    <bpmn:participant id="Participant_dbtr" name="Debtor agent (debtor bank)" processRef="Process_dbtr" />
    <bpmn:participant id="Participant_csm" name="Clearing and settlement mechanism (CSM)" processRef="Process_csm" />
    <bpmn:participant id="Participant_cdtr" name="Creditor agent (creditor bank)" processRef="Process_cdtr" />
    <bpmn:participant id="Participant_creditor" name="Creditor (beneficiary)" />
    <bpmn:messageFlow id="Message_1" name="pain.001" sourceRef="Participant_debtor" targetRef="Node_d0" />
    <bpmn:messageFlow id="Message_2" name="pain.002 ACTC" sourceRef="Node_d1" targetRef="Participant_debtor" />
    <bpmn:messageFlow id="Message_3" name="pain.002 ACSP" sourceRef="Node_d3" targetRef="Participant_debtor" />
    <bpmn:messageFlow id="Message_4" name="pacs.008" sourceRef="Node_d3" targetRef="Node_c0" />
    <bpmn:messageFlow id="Message_5" name="pacs.008" sourceRef="Node_c1" targetRef="Node_k0" />
    <bpmn:messageFlow id="Message_6" name="pacs.002 ACCP" sourceRef="Node_k1" targetRef="Node_c2" />
    <bpmn:messageFlow id="Message_7" name="pacs.002 ACSC" sourceRef="Node_c3" targetRef="Node_d4" />
    <bpmn:messageFlow id="Message_8" name="pacs.002 ACSC" sourceRef="Node_c3" targetRef="Node_k2" />
    <bpmn:messageFlow id="Message_9" name="pain.002 ACSC" sourceRef="Node_d5" targetRef="Participant_debtor" />
    <bpmn:messageFlow id="Message_10" name="camt.054 credit notice" sourceRef="Node_k4" targetRef="Participant_creditor" />
  </bpmn:collaboration>
  <bpmn:process id="Process_dbtr" name="Debtor agent (debtor bank)" isExecutable="false">
    <bpmn:startEvent id="Node_d0" name="pain.001 received">
      <bpmn:outgoing>Flow_1</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_d0_def" />
    </bpmn:startEvent>
    <bpmn:serviceTask id="Node_d1" name="Authenticate and validate">
      <bpmn:incoming>Flow_1</bpmn:incoming>
      <bpmn:outgoing>Flow_2</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="Node_d2" name="Screen, check limits and funds">
      <bpmn:incoming>Flow_2</bpmn:incoming>
      <bpmn:outgoing>Flow_3</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sendTask id="Node_d3" name="Debit account, send pacs.008">
      <bpmn:incoming>Flow_3</bpmn:incoming>
      <bpmn:outgoing>Flow_4</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:intermediateCatchEvent id="Node_d4" name="Settlement confirmed">
      <bpmn:incoming>Flow_4</bpmn:incoming>
      <bpmn:outgoing>Flow_5</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_d4_def" />
    </bpmn:intermediateCatchEvent>
    <bpmn:endEvent id="Node_d5" name="Report final status">
      <bpmn:incoming>Flow_5</bpmn:incoming>
      <bpmn:messageEventDefinition id="Node_d5_def" />
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1" sourceRef="Node_d0" targetRef="Node_d1" />
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Node_d1" targetRef="Node_d2" />
    <bpmn:sequenceFlow id="Flow_3" sourceRef="Node_d2" targetRef="Node_d3" />
    <bpmn:sequenceFlow id="Flow_4" sourceRef="Node_d3" targetRef="Node_d4" />
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Node_d4" targetRef="Node_d5" />
  </bpmn:process>
  <bpmn:process id="Process_csm" name="Clearing and settlement mechanism (CSM)" isExecutable="false">
    <bpmn:startEvent id="Node_c0" name="pacs.008 received">
      <bpmn:outgoing>Flow_6</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_c0_def" />
    </bpmn:startEvent>
    <bpmn:sendTask id="Node_c1" name="Validate and route">
      <bpmn:incoming>Flow_6</bpmn:incoming>
      <bpmn:outgoing>Flow_7</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:intermediateCatchEvent id="Node_c2" name="Acceptance received">
      <bpmn:incoming>Flow_7</bpmn:incoming>
      <bpmn:outgoing>Flow_8</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_c2_def" />
    </bpmn:intermediateCatchEvent>
    <bpmn:sendTask id="Node_c3" name="Settle and confirm">
      <bpmn:incoming>Flow_8</bpmn:incoming>
      <bpmn:outgoing>Flow_9</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:endEvent id="Node_c4" name="Settled">
      <bpmn:incoming>Flow_9</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Node_c0" targetRef="Node_c1" />
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Node_c1" targetRef="Node_c2" />
    <bpmn:sequenceFlow id="Flow_8" sourceRef="Node_c2" targetRef="Node_c3" />
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Node_c3" targetRef="Node_c4" />
  </bpmn:process>
  <bpmn:process id="Process_cdtr" name="Creditor agent (creditor bank)" isExecutable="false">
    <bpmn:startEvent id="Node_k0" name="pacs.008 received">
      <bpmn:outgoing>Flow_10</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_k0_def" />
    </bpmn:startEvent>
    <bpmn:sendTask id="Node_k1" name="Check account, accept">
      <bpmn:incoming>Flow_10</bpmn:incoming>
      <bpmn:outgoing>Flow_11</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:intermediateCatchEvent id="Node_k2" name="Settlement confirmed">
      <bpmn:incoming>Flow_11</bpmn:incoming>
      <bpmn:outgoing>Flow_12</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_k2_def" />
    </bpmn:intermediateCatchEvent>
    <bpmn:serviceTask id="Node_k3" name="Credit creditor account">
      <bpmn:incoming>Flow_12</bpmn:incoming>
      <bpmn:outgoing>Flow_13</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="Node_k4" name="Notify creditor">
      <bpmn:incoming>Flow_13</bpmn:incoming>
      <bpmn:messageEventDefinition id="Node_k4_def" />
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_10" sourceRef="Node_k0" targetRef="Node_k1" />
    <bpmn:sequenceFlow id="Flow_11" sourceRef="Node_k1" targetRef="Node_k2" />
    <bpmn:sequenceFlow id="Flow_12" sourceRef="Node_k2" targetRef="Node_k3" />
    <bpmn:sequenceFlow id="Flow_13" sourceRef="Node_k3" targetRef="Node_k4" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Happy path: settled and credited">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1">
      <bpmndi:BPMNShape id="Participant_debtor_di" bpmnElement="Participant_debtor" isHorizontal="true"><dc:Bounds x="8" y="8" width="1258" height="52" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_dbtr_di" bpmnElement="Participant_dbtr" isHorizontal="true"><dc:Bounds x="8" y="124" width="1258" height="124" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_csm_di" bpmnElement="Participant_csm" isHorizontal="true"><dc:Bounds x="8" y="312" width="1258" height="124" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_cdtr_di" bpmnElement="Participant_cdtr" isHorizontal="true"><dc:Bounds x="8" y="500" width="1258" height="124" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_creditor_di" bpmnElement="Participant_creditor" isHorizontal="true"><dc:Bounds x="8" y="688" width="1258" height="52" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_d0_di" bpmnElement="Node_d0"><dc:Bounds x="98" y="168" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="66" y="208" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_d1_di" bpmnElement="Node_d1"><dc:Bounds x="190" y="150" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_d2_di" bpmnElement="Node_d2"><dc:Bounds x="314" y="150" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_d3_di" bpmnElement="Node_d3"><dc:Bounds x="438" y="150" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_d4_di" bpmnElement="Node_d4"><dc:Bounds x="842" y="168" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="810" y="136" width="100" height="26" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_d5_di" bpmnElement="Node_d5"><dc:Bounds x="966" y="168" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="934" y="208" width="100" height="26" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_c0_di" bpmnElement="Node_c0"><dc:Bounds x="470" y="356" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="438" y="396" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_c1_di" bpmnElement="Node_c1"><dc:Bounds x="562" y="338" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_c2_di" bpmnElement="Node_c2"><dc:Bounds x="718" y="356" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="686" y="324" width="100" height="26" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_c3_di" bpmnElement="Node_c3"><dc:Bounds x="810" y="338" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_c4_di" bpmnElement="Node_c4"><dc:Bounds x="966" y="356" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="934" y="396" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k0_di" bpmnElement="Node_k0"><dc:Bounds x="594" y="544" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="562" y="584" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k1_di" bpmnElement="Node_k1"><dc:Bounds x="686" y="526" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k2_di" bpmnElement="Node_k2"><dc:Bounds x="842" y="544" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="810" y="584" width="100" height="26" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k3_di" bpmnElement="Node_k3"><dc:Bounds x="934" y="526" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k4_di" bpmnElement="Node_k4"><dc:Bounds x="1090" y="544" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1058" y="525" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="134" y="186" /><di:waypoint x="190" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="290" y="186" /><di:waypoint x="314" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="414" y="186" /><di:waypoint x="438" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="538" y="186" /><di:waypoint x="842" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="878" y="186" /><di:waypoint x="966" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="506" y="374" /><di:waypoint x="562" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="662" y="374" /><di:waypoint x="718" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="754" y="374" /><di:waypoint x="810" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="910" y="374" /><di:waypoint x="966" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_di" bpmnElement="Flow_10"><di:waypoint x="630" y="562" /><di:waypoint x="686" y="562" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_di" bpmnElement="Flow_11"><di:waypoint x="786" y="562" /><di:waypoint x="842" y="562" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12_di" bpmnElement="Flow_12"><di:waypoint x="878" y="562" /><di:waypoint x="934" y="562" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_13_di" bpmnElement="Flow_13"><di:waypoint x="1034" y="562" /><di:waypoint x="1090" y="562" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_1_di" bpmnElement="Message_1"><di:waypoint x="116" y="60" /><di:waypoint x="116" y="168" /><bpmndi:BPMNLabel><dc:Bounds x="123" y="78" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_2_di" bpmnElement="Message_2"><di:waypoint x="240" y="150" /><di:waypoint x="240" y="60" /><bpmndi:BPMNLabel><dc:Bounds x="247" y="78" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_3_di" bpmnElement="Message_3"><di:waypoint x="488" y="150" /><di:waypoint x="488" y="60" /><bpmndi:BPMNLabel><dc:Bounds x="495" y="78" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_4_di" bpmnElement="Message_4"><di:waypoint x="488" y="222" /><di:waypoint x="488" y="356" /><bpmndi:BPMNLabel><dc:Bounds x="495" y="266" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_5_di" bpmnElement="Message_5"><di:waypoint x="612" y="410" /><di:waypoint x="612" y="544" /><bpmndi:BPMNLabel><dc:Bounds x="619" y="454" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_6_di" bpmnElement="Message_6"><di:waypoint x="736" y="526" /><di:waypoint x="736" y="392" /><bpmndi:BPMNLabel><dc:Bounds x="743" y="454" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_7_di" bpmnElement="Message_7"><di:waypoint x="860" y="338" /><di:waypoint x="860" y="204" /><bpmndi:BPMNLabel><dc:Bounds x="867" y="266" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_8_di" bpmnElement="Message_8"><di:waypoint x="860" y="410" /><di:waypoint x="860" y="544" /><bpmndi:BPMNLabel><dc:Bounds x="867" y="454" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_9_di" bpmnElement="Message_9"><di:waypoint x="984" y="168" /><di:waypoint x="984" y="60" /><bpmndi:BPMNLabel><dc:Bounds x="991" y="78" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_10_di" bpmnElement="Message_10"><di:waypoint x="1108" y="580" /><di:waypoint x="1108" y="688" /><bpmndi:BPMNLabel><dc:Bounds x="1115" y="642" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
