<?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_rejected_by_creditor_bank" targetNamespace="https://www.analystengineering.com/iso-20022/payment-process-bpmn" exporter="Analyst Engineering" exporterVersion="1.0">
  <bpmn:collaboration id="Collaboration_1">
    <bpmn:documentation>Rejected by the creditor bank: AC04 closed account. The creditor agent finds the account closed and answers the pacs.008 with pacs.002 RJCT AC04; the CSM forwards the rejection without settling, the debtor agent releases the reserved funds and reports pain.002 RJCT AC04. Nothing settled, so nothing has to be returned. Source: https://www.analystengineering.com/iso-20022/payment-process-bpmn#rejected-by-creditor-bank</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:messageFlow id="Message_1" name="pain.001" sourceRef="Participant_debtor" targetRef="Node_b0" />
    <bpmn:messageFlow id="Message_2" name="pacs.008" sourceRef="Node_b2" targetRef="Node_s0" />
    <bpmn:messageFlow id="Message_3" name="pacs.008" sourceRef="Node_s1" targetRef="Node_k0" />
    <bpmn:messageFlow id="Message_4" name="pacs.002 RJCT AC04" sourceRef="Node_k3" targetRef="Node_s2" />
    <bpmn:messageFlow id="Message_5" name="pacs.002 RJCT AC04" sourceRef="Node_s3" targetRef="Node_b3" />
    <bpmn:messageFlow id="Message_6" name="pain.002 RJCT AC04" sourceRef="Node_b5" targetRef="Participant_debtor" />
  </bpmn:collaboration>
  <bpmn:process id="Process_dbtr" name="Debtor agent (debtor bank)" isExecutable="false">
    <bpmn:startEvent id="Node_b0" name="pain.001 received">
      <bpmn:outgoing>Flow_1</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_b0_def" />
    </bpmn:startEvent>
    <bpmn:serviceTask id="Node_b1" name="Validate, screen, check funds">
      <bpmn:incoming>Flow_1</bpmn:incoming>
      <bpmn:outgoing>Flow_2</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sendTask id="Node_b2" name="Reserve funds, send pacs.008">
      <bpmn:incoming>Flow_2</bpmn:incoming>
      <bpmn:outgoing>Flow_3</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:intermediateCatchEvent id="Node_b3" name="Rejection received">
      <bpmn:incoming>Flow_3</bpmn:incoming>
      <bpmn:outgoing>Flow_4</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_b3_def" />
    </bpmn:intermediateCatchEvent>
    <bpmn:serviceTask id="Node_b4" name="Release reserved funds">
      <bpmn:incoming>Flow_4</bpmn:incoming>
      <bpmn:outgoing>Flow_5</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="Node_b5" name="Report rejection">
      <bpmn:incoming>Flow_5</bpmn:incoming>
      <bpmn:messageEventDefinition id="Node_b5_def" />
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1" sourceRef="Node_b0" targetRef="Node_b1" />
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Node_b1" targetRef="Node_b2" />
    <bpmn:sequenceFlow id="Flow_3" sourceRef="Node_b2" targetRef="Node_b3" />
    <bpmn:sequenceFlow id="Flow_4" sourceRef="Node_b3" targetRef="Node_b4" />
    <bpmn:sequenceFlow id="Flow_5" sourceRef="Node_b4" targetRef="Node_b5" />
  </bpmn:process>
  <bpmn:process id="Process_csm" name="Clearing and settlement mechanism (CSM)" isExecutable="false">
    <bpmn:startEvent id="Node_s0" name="pacs.008 received">
      <bpmn:outgoing>Flow_6</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_s0_def" />
    </bpmn:startEvent>
    <bpmn:sendTask id="Node_s1" name="Validate and forward">
      <bpmn:incoming>Flow_6</bpmn:incoming>
      <bpmn:outgoing>Flow_7</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:intermediateCatchEvent id="Node_s2" name="Rejection received">
      <bpmn:incoming>Flow_7</bpmn:incoming>
      <bpmn:outgoing>Flow_8</bpmn:outgoing>
      <bpmn:messageEventDefinition id="Node_s2_def" />
    </bpmn:intermediateCatchEvent>
    <bpmn:sendTask id="Node_s3" name="Forward rejection">
      <bpmn:incoming>Flow_8</bpmn:incoming>
      <bpmn:outgoing>Flow_9</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:endEvent id="Node_s4" name="Not settled">
      <bpmn:incoming>Flow_9</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Node_s0" targetRef="Node_s1" />
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Node_s1" targetRef="Node_s2" />
    <bpmn:sequenceFlow id="Flow_8" sourceRef="Node_s2" targetRef="Node_s3" />
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Node_s3" targetRef="Node_s4" />
  </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:serviceTask id="Node_k1" name="Check creditor account">
      <bpmn:incoming>Flow_10</bpmn:incoming>
      <bpmn:outgoing>Flow_11</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="Node_k2" name="Account open?">
      <bpmn:incoming>Flow_11</bpmn:incoming>
      <bpmn:outgoing>Flow_12</bpmn:outgoing>
      <bpmn:outgoing>Flow_13</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:endEvent id="Node_k3" name="Reject">
      <bpmn:incoming>Flow_12</bpmn:incoming>
      <bpmn:messageEventDefinition id="Node_k3_def" />
    </bpmn:endEvent>
    <bpmn:callActivity id="Node_k4" name="Accept (scenario 1)">
      <bpmn:incoming>Flow_13</bpmn:incoming>
      <bpmn:outgoing>Flow_14</bpmn:outgoing>
    </bpmn:callActivity>
    <bpmn:endEvent id="Node_k5" name="Accepted">
      <bpmn:incoming>Flow_14</bpmn:incoming>
    </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" name="Closed" sourceRef="Node_k2" targetRef="Node_k3" />
    <bpmn:sequenceFlow id="Flow_13" name="Yes" sourceRef="Node_k2" targetRef="Node_k4" />
    <bpmn:sequenceFlow id="Flow_14" sourceRef="Node_k4" targetRef="Node_k5" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Rejected by the creditor bank: AC04 closed account">
    <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="1382" height="52" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_dbtr_di" bpmnElement="Participant_dbtr" isHorizontal="true"><dc:Bounds x="8" y="124" width="1382" height="124" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_csm_di" bpmnElement="Participant_csm" isHorizontal="true"><dc:Bounds x="8" y="312" width="1382" height="124" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Participant_cdtr_di" bpmnElement="Participant_cdtr" isHorizontal="true"><dc:Bounds x="8" y="500" width="1382" height="228" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_b0_di" bpmnElement="Node_b0"><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_b1_di" bpmnElement="Node_b1"><dc:Bounds x="190" y="150" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_b2_di" bpmnElement="Node_b2"><dc:Bounds x="314" y="150" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_b3_di" bpmnElement="Node_b3"><dc:Bounds x="966" y="168" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="934" y="149" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_b4_di" bpmnElement="Node_b4"><dc:Bounds x="1058" y="150" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_b5_di" bpmnElement="Node_b5"><dc:Bounds x="1214" y="168" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1182" y="208" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_s0_di" bpmnElement="Node_s0"><dc:Bounds x="346" y="356" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="314" y="396" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_s1_di" bpmnElement="Node_s1"><dc:Bounds x="438" y="338" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_s2_di" bpmnElement="Node_s2"><dc:Bounds x="842" y="356" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="810" y="337" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_s3_di" bpmnElement="Node_s3"><dc:Bounds x="934" y="338" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_s4_di" bpmnElement="Node_s4"><dc:Bounds x="1090" y="356" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1058" y="396" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k0_di" bpmnElement="Node_k0"><dc:Bounds x="470" y="544" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="438" y="584" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k1_di" bpmnElement="Node_k1"><dc:Bounds x="562" y="526" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k2_di" bpmnElement="Node_k2" isMarkerVisible="true"><dc:Bounds x="711" y="537" width="50" height="50" /><bpmndi:BPMNLabel><dc:Bounds x="686" y="518" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k3_di" bpmnElement="Node_k3"><dc:Bounds x="842" y="544" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="810" y="584" width="100" height="13" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k4_di" bpmnElement="Node_k4"><dc:Bounds x="810" y="630" width="100" height="72" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Node_k5_di" bpmnElement="Node_k5"><dc:Bounds x="966" y="648" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="934" y="688" 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="966" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="1002" y="186" /><di:waypoint x="1058" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="1158" y="186" /><di:waypoint x="1214" y="186" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="382" y="374" /><di:waypoint x="438" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="538" y="374" /><di:waypoint x="842" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="878" y="374" /><di:waypoint x="934" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="1034" y="374" /><di:waypoint x="1090" y="374" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10_di" bpmnElement="Flow_10"><di:waypoint x="506" y="562" /><di:waypoint x="562" y="562" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_11_di" bpmnElement="Flow_11"><di:waypoint x="662" y="562" /><di:waypoint x="711" y="562" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12_di" bpmnElement="Flow_12"><di:waypoint x="761" y="562" /><di:waypoint x="842" y="562" /><bpmndi:BPMNLabel><dc:Bounds x="767" y="545" width="60" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_13_di" bpmnElement="Flow_13"><di:waypoint x="736" y="587" /><di:waypoint x="736" y="666" /><di:waypoint x="810" y="666" /><bpmndi:BPMNLabel><dc:Bounds x="742" y="590" width="60" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_14_di" bpmnElement="Flow_14"><di:waypoint x="910" y="666" /><di:waypoint x="966" y="666" /></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="364" y="222" /><di:waypoint x="364" y="356" /><bpmndi:BPMNLabel><dc:Bounds x="371" y="266" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_3_di" bpmnElement="Message_3"><di:waypoint x="488" y="410" /><di:waypoint x="488" y="544" /><bpmndi:BPMNLabel><dc:Bounds x="495" y="454" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_4_di" bpmnElement="Message_4"><di:waypoint x="860" y="544" /><di:waypoint x="860" y="392" /><bpmndi:BPMNLabel><dc:Bounds x="867" y="454" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_5_di" bpmnElement="Message_5"><di:waypoint x="984" y="338" /><di:waypoint x="984" y="204" /><bpmndi:BPMNLabel><dc:Bounds x="991" y="266" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Message_6_di" bpmnElement="Message_6"><di:waypoint x="1232" y="168" /><di:waypoint x="1232" y="60" /><bpmndi:BPMNLabel><dc:Bounds x="1239" y="78" width="96" height="28" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
