<?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:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:modeler="http://camunda.org/schema/modeler/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="P01_definitions" targetNamespace="https://reputations.example/strategy/v1" exporter="Reputations strategic documentation" exporterVersion="1.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.9.0">
  <bpmn:process id="P01" name="Onboarding i ciągłość tożsamości" isExecutable="false">
    <bpmn:documentation>Powiązać konto i klucz z osobą; ponowna rejestracja nie tworzy czystej historii. Model strategiczny: nie wdrażać bez workerów, formularzy i testów. SMS nie dowodzi tożsamości fizycznej. Niepewne zbieżności wymagają ręcznego rozstrzygnięcia, bez automatycznego scalenia.</bpmn:documentation>
    <bpmn:laneSet id="P01_lanes">
      <bpmn:lane id="P01_lane_0" name="Osoba">
        <bpmn:flowNodeRef>P01_start</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_request</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_weak</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_endweak</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="P01_lane_1" name="Dostawca tożsamości">
        <bpmn:flowNodeRef>P01_proof</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_gate</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_match</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_existing</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="P01_lane_2" name="Rejestr i portfel">
        <bpmn:flowNodeRef>P01_new</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_recover</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_endnew</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>P01_endrecover</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="P01_start" name="Nowe konto">
      <bpmn:documentation>Odpowiedzialność: Osoba. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:outgoing>P01_f1</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="P01_request" name="Przedstaw dowód osoby i nowy klucz">
      <bpmn:documentation>Odpowiedzialność: Osoba. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:extensionElements>
        <zeebe:userTask/>
      </bpmn:extensionElements>
      <bpmn:incoming>P01_f1</bpmn:incoming>
      <bpmn:outgoing>P01_f2</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="P01_proof" name="Zweryfikuj dowód i kontrolę klucza">
      <bpmn:documentation>Odpowiedzialność: Dostawca tożsamości. Projektowany job: reputations.identity.proof. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="reputations.identity.proof" retries="3"/>
      </bpmn:extensionElements>
      <bpmn:incoming>P01_f2</bpmn:incoming>
      <bpmn:outgoing>P01_f3</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="P01_gate" name="Wynik dowodu?" default="P01_f4">
      <bpmn:documentation>Odpowiedzialność: Dostawca tożsamości. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:incoming>P01_f3</bpmn:incoming>
      <bpmn:outgoing>P01_f4</bpmn:outgoing>
      <bpmn:outgoing>P01_f6</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="P01_weak" name="Oznacz konto U0/U1; nie łącz historii">
      <bpmn:documentation>Odpowiedzialność: Osoba. Projektowany job: reputations.identity.limit. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="reputations.identity.limit" retries="3"/>
      </bpmn:extensionElements>
      <bpmn:incoming>P01_f4</bpmn:incoming>
      <bpmn:outgoing>P01_f5</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="P01_endweak" name="Profil ograniczony">
      <bpmn:documentation>Odpowiedzialność: Osoba. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:incoming>P01_f5</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:serviceTask id="P01_match" name="Deduplikuj w prywatnym rejestrze">
      <bpmn:documentation>Odpowiedzialność: Dostawca tożsamości. Projektowany job: reputations.identity.resolve. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="reputations.identity.resolve" retries="3"/>
      </bpmn:extensionElements>
      <bpmn:incoming>P01_f6</bpmn:incoming>
      <bpmn:outgoing>P01_f7</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="P01_existing" name="Profil istnieje?" default="P01_f8">
      <bpmn:documentation>Odpowiedzialność: Dostawca tożsamości. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:incoming>P01_f7</bpmn:incoming>
      <bpmn:outgoing>P01_f8</bpmn:outgoing>
      <bpmn:outgoing>P01_f10</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="P01_new" name="Nadaj prywatny identyfikator osoby">
      <bpmn:documentation>Odpowiedzialność: Rejestr i portfel. Projektowany job: reputations.identity.create. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="reputations.identity.create" retries="3"/>
      </bpmn:extensionElements>
      <bpmn:incoming>P01_f8</bpmn:incoming>
      <bpmn:outgoing>P01_f9</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:serviceTask id="P01_recover" name="Skieruj do odzyskania P14">
      <bpmn:documentation>Odpowiedzialność: Rejestr i portfel. Projektowany job: reputations.identity.recovery.request. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="reputations.identity.recovery.request" retries="3"/>
      </bpmn:extensionElements>
      <bpmn:incoming>P01_f10</bpmn:incoming>
      <bpmn:outgoing>P01_f11</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="P01_endnew" name="Profil V2/V3">
      <bpmn:documentation>Odpowiedzialność: Rejestr i portfel. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:incoming>P01_f9</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:endEvent id="P01_endrecover" name="Bez resetu historii">
      <bpmn:documentation>Odpowiedzialność: Rejestr i portfel. Zmienne zawierają wyłącznie niejawne referencje, nie treści ani sekrety.</bpmn:documentation>
      <bpmn:incoming>P01_f11</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="P01_f1" sourceRef="P01_start" targetRef="P01_request"/>
    <bpmn:sequenceFlow id="P01_f2" sourceRef="P01_request" targetRef="P01_proof"/>
    <bpmn:sequenceFlow id="P01_f3" sourceRef="P01_proof" targetRef="P01_gate"/>
    <bpmn:sequenceFlow id="P01_f4" sourceRef="P01_gate" targetRef="P01_weak" name="Niewystarczający"/>
    <bpmn:sequenceFlow id="P01_f5" sourceRef="P01_weak" targetRef="P01_endweak"/>
    <bpmn:sequenceFlow id="P01_f6" sourceRef="P01_gate" targetRef="P01_match" name="Zweryfikowany">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">= outcome = "verified"</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="P01_f7" sourceRef="P01_match" targetRef="P01_existing"/>
    <bpmn:sequenceFlow id="P01_f8" sourceRef="P01_existing" targetRef="P01_new" name="Nie"/>
    <bpmn:sequenceFlow id="P01_f9" sourceRef="P01_new" targetRef="P01_endnew"/>
    <bpmn:sequenceFlow id="P01_f10" sourceRef="P01_existing" targetRef="P01_recover" name="Tak">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">= existing_profile = true</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="P01_f11" sourceRef="P01_recover" targetRef="P01_endrecover"/>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="P01_diagram">
    <bpmndi:BPMNPlane id="P01_plane" bpmnElement="P01">
      <bpmndi:BPMNShape id="P01_lane_di_0" bpmnElement="P01_lane_0" isHorizontal="true">
        <dc:Bounds x="20" y="38" width="1455" height="166"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_lane_di_1" bpmnElement="P01_lane_1" isHorizontal="true">
        <dc:Bounds x="20" y="204" width="1455" height="166"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_lane_di_2" bpmnElement="P01_lane_2" isHorizontal="true">
        <dc:Bounds x="20" y="370" width="1455" height="166"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_start_di" bpmnElement="P01_start">
        <dc:Bounds x="186.0" y="101.0" width="40" height="40"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="126.0" y="146.0" width="160" height="44"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_request_di" bpmnElement="P01_request">
        <dc:Bounds x="324.0" y="82.0" width="152" height="78"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_proof_di" bpmnElement="P01_proof">
        <dc:Bounds x="518.0" y="248.0" width="152" height="78"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_gate_di" bpmnElement="P01_gate">
        <dc:Bounds x="759.0" y="258.0" width="58" height="58"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="708.0" y="321.0" width="160" height="44"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_weak_di" bpmnElement="P01_weak">
        <dc:Bounds x="906.0" y="82.0" width="152" height="78"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_endweak_di" bpmnElement="P01_endweak">
        <dc:Bounds x="1156.0" y="101.0" width="40" height="40"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1096.0" y="146.0" width="160" height="44"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_match_di" bpmnElement="P01_match">
        <dc:Bounds x="906.0" y="248.0" width="152" height="78"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_existing_di" bpmnElement="P01_existing">
        <dc:Bounds x="1147.0" y="258.0" width="58" height="58"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1096.0" y="321.0" width="160" height="44"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_new_di" bpmnElement="P01_new">
        <dc:Bounds x="906.0" y="414.0" width="152" height="78"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_recover_di" bpmnElement="P01_recover">
        <dc:Bounds x="1100.0" y="414.0" width="152" height="78"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_endnew_di" bpmnElement="P01_endnew">
        <dc:Bounds x="768.0" y="433.0" width="40" height="40"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="708.0" y="478.0" width="160" height="44"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="P01_endrecover_di" bpmnElement="P01_endrecover">
        <dc:Bounds x="1350.0" y="433.0" width="40" height="40"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1290.0" y="478.0" width="160" height="44"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="P01_f1_di" bpmnElement="P01_f1">
        <di:waypoint x="226.0" y="121.0"/>
        <di:waypoint x="324.0" y="121.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f2_di" bpmnElement="P01_f2">
        <di:waypoint x="476.0" y="121.0"/>
        <di:waypoint x="497.0" y="121.0"/>
        <di:waypoint x="497.0" y="287.0"/>
        <di:waypoint x="518.0" y="287.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f3_di" bpmnElement="P01_f3">
        <di:waypoint x="670.0" y="287.0"/>
        <di:waypoint x="759.0" y="287.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f4_di" bpmnElement="P01_f4">
        <di:waypoint x="817.0" y="287.0"/>
        <di:waypoint x="861.5" y="287.0"/>
        <di:waypoint x="861.5" y="121.0"/>
        <di:waypoint x="906.0" y="121.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="854.5" y="180.0" width="110" height="28"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f5_di" bpmnElement="P01_f5">
        <di:waypoint x="1058.0" y="121.0"/>
        <di:waypoint x="1156.0" y="121.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f6_di" bpmnElement="P01_f6">
        <di:waypoint x="817.0" y="287.0"/>
        <di:waypoint x="906.0" y="287.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="806.5" y="263.0" width="110" height="28"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f7_di" bpmnElement="P01_f7">
        <di:waypoint x="1058.0" y="287.0"/>
        <di:waypoint x="1147.0" y="287.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f8_di" bpmnElement="P01_f8">
        <di:waypoint x="1176.0" y="316.0"/>
        <di:waypoint x="1176.0" y="370"/>
        <di:waypoint x="982.0" y="370"/>
        <di:waypoint x="982.0" y="414.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1024.0" y="346.0" width="110" height="28"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f9_di" bpmnElement="P01_f9">
        <di:waypoint x="982.0" y="492.0"/>
        <di:waypoint x="982.0" y="518"/>
        <di:waypoint x="788.0" y="518"/>
        <di:waypoint x="788.0" y="473.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f10_di" bpmnElement="P01_f10">
        <di:waypoint x="1176.0" y="316.0"/>
        <di:waypoint x="1176.0" y="414.0"/>
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1169.0" y="341.0" width="110" height="28"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="P01_f11_di" bpmnElement="P01_f11">
        <di:waypoint x="1252.0" y="453.0"/>
        <di:waypoint x="1350.0" y="453.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
