<?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" id="KP_HP_17_Definitions" targetNamespace="urn:caf:public:descriptive-process">
  <bpmn:process id="KP_HP_17_Process" name="KP-HP-17: Institutionen per Datei übernehmen" isExecutable="false">
    <bpmn:documentation textFormat="text/plain">Der Referent prüft einen Institutionsbestand zunächst in einer unverbindlichen Vorschau und löst danach den Import aus. Nur neue gültige Datensätze werden angelegt. Bekannte Namen werden übersprungen; Fehler erscheinen je Zeile im Ergebnisbericht.</bpmn:documentation>
    <bpmn:laneSet id="KP_HP_17_LaneSet">
      <bpmn:lane id="KP_HP_17_Lane_0" name="Referent">
        <bpmn:documentation textFormat="text/plain">Verantwortung: Referent</bpmn:documentation>
        <bpmn:flowNodeRef>KP_HP_17_Start</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_File</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Review</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Confirm</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Result</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Cancel</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="KP_HP_17_Lane_1" name="Portal">
        <bpmn:documentation textFormat="text/plain">Verantwortung: Portal</bpmn:documentation>
        <bpmn:flowNodeRef>KP_HP_17_Preview</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Readable</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Create</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>KP_HP_17_Invalid</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="KP_HP_17_Start" name="Institutionsliste zu übernehmen">
      <bpmn:documentation textFormat="text/plain">Für interne Konten mit Institutionspflege und Anlagerecht.</bpmn:documentation>
      <bpmn:outgoing>KP_HP_17_Flow_Start_File</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="KP_HP_17_File" name="Datei wählen und Vorschau starten">
      <bpmn:documentation textFormat="text/plain">Datei nach dem bestehenden Institutions-Dateivertrag auswählen. Der Vorschauaufruf schreibt keine Institution.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Start_File</bpmn:incoming>
      <bpmn:outgoing>KP_HP_17_Flow_File_Preview</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="KP_HP_17_Preview" name="Datei und Zeilen bewerten">
      <bpmn:documentation textFormat="text/plain">Bekannte Namen zuerst erkennen; neue Zeilen einschließlich Kontaktblöcken, Katalogwerten, Standard und Pflichtpartnermerkmal prüfen.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_File_Preview</bpmn:incoming>
      <bpmn:outgoing>KP_HP_17_Flow_Preview_Readable</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="KP_HP_17_Readable" name="Datei lesbar und befüllt?">
      <bpmn:documentation textFormat="text/plain">Eine unlesbare oder leere Datei bricht die Verarbeitung ab. Fehler einzelner lesbarer Zeilen bleiben im Zeilenbericht.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Preview_Readable</bpmn:incoming>
      <bpmn:outgoing>KP_HP_17_Flow_Readable_Review</bpmn:outgoing>
      <bpmn:outgoing>KP_HP_17_Flow_Readable_Invalid</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="KP_HP_17_Review" name="Vorschauergebnis prüfen">
      <bpmn:documentation textFormat="text/plain">Anlagekandidaten, übersprungene Namen und Fehlerzeilen prüfen. Vorschau reserviert weder Namen noch einen Bestandsstand.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Readable_Review</bpmn:incoming>
      <bpmn:outgoing>KP_HP_17_Flow_Review_Confirm</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="KP_HP_17_Confirm" name="Import auslösen?">
      <bpmn:documentation textFormat="text/plain">Ohne ausdrückliche Bestätigung bleibt der Bestand unverändert.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Review_Confirm</bpmn:incoming>
      <bpmn:outgoing>KP_HP_17_Flow_Confirm_Create</bpmn:outgoing>
      <bpmn:outgoing>KP_HP_17_Flow_Confirm_Cancel</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:serviceTask id="KP_HP_17_Create" name="Nur neue gültige Zeilen anlegen">
      <bpmn:documentation textFormat="text/plain">Bestand erneut lesen: getrimmte Namen ohne Groß-/Kleinschreibung erkennen. Bekannte überspringen; ungültige neue Zeilen melden; gültige neue Institution samt Kontakten vollständig anlegen.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Confirm_Create</bpmn:incoming>
      <bpmn:outgoing>KP_HP_17_Flow_Create_Result</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:endEvent id="KP_HP_17_Result" name="Zeilenbericht bereit">
      <bpmn:documentation textFormat="text/plain">Der Bericht trennt angelegte, übersprungene und fehlerhafte Zeilen. Fehler nacharbeiten; ein erneuter Import ersetzt keine vorhandenen Daten. Gleichzeitige unabhängige Neuanlagen sind kein garantierter Dublettenschutz.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Create_Result</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:endEvent id="KP_HP_17_Invalid" name="Datei abgewiesen">
      <bpmn:documentation textFormat="text/plain">Dateivertrag oder fehlende Datensätze korrigieren und eine neue Vorschau starten.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Readable_Invalid</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:endEvent id="KP_HP_17_Cancel" name="Bestand unverändert">
      <bpmn:documentation textFormat="text/plain">Die Vorschau wurde nicht als Import bestätigt.</bpmn:documentation>
      <bpmn:incoming>KP_HP_17_Flow_Confirm_Cancel</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Start_File" sourceRef="KP_HP_17_Start" targetRef="KP_HP_17_File">
      <bpmn:documentation textFormat="text/plain">Weiter zum nächsten fachlichen Schritt.</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_File_Preview" sourceRef="KP_HP_17_File" targetRef="KP_HP_17_Preview">
      <bpmn:documentation textFormat="text/plain">Weiter zum nächsten fachlichen Schritt.</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Preview_Readable" sourceRef="KP_HP_17_Preview" targetRef="KP_HP_17_Readable">
      <bpmn:documentation textFormat="text/plain">Weiter zum nächsten fachlichen Schritt.</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Readable_Review" sourceRef="KP_HP_17_Readable" targetRef="KP_HP_17_Review" name="Ja">
      <bpmn:documentation textFormat="text/plain">Ja</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Readable_Invalid" sourceRef="KP_HP_17_Readable" targetRef="KP_HP_17_Invalid" name="Nein">
      <bpmn:documentation textFormat="text/plain">Nein</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Review_Confirm" sourceRef="KP_HP_17_Review" targetRef="KP_HP_17_Confirm">
      <bpmn:documentation textFormat="text/plain">Weiter zum nächsten fachlichen Schritt.</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Confirm_Create" sourceRef="KP_HP_17_Confirm" targetRef="KP_HP_17_Create" name="Ja">
      <bpmn:documentation textFormat="text/plain">Ja</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Confirm_Cancel" sourceRef="KP_HP_17_Confirm" targetRef="KP_HP_17_Cancel" name="Nein">
      <bpmn:documentation textFormat="text/plain">Nein</bpmn:documentation>
      </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="KP_HP_17_Flow_Create_Result" sourceRef="KP_HP_17_Create" targetRef="KP_HP_17_Result">
      <bpmn:documentation textFormat="text/plain">Weiter zum nächsten fachlichen Schritt.</bpmn:documentation>
      </bpmn:sequenceFlow>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="KP_HP_17_Diagram" name="Fachlicher Ablauf">
    <bpmndi:BPMNPlane id="KP_HP_17_Plane" bpmnElement="KP_HP_17_Process">
      <bpmndi:BPMNShape id="KP_HP_17_Lane_0_di" bpmnElement="KP_HP_17_Lane_0" isHorizontal="true">
        <dc:Bounds x="80" y="70" width="1888.0" height="280" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Lane_1_di" bpmnElement="KP_HP_17_Lane_1" isHorizontal="true">
        <dc:Bounds x="80" y="350" width="1888.0" height="280" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Start_di" bpmnElement="KP_HP_17_Start">
        <dc:Bounds x="232.0" y="132.0" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="178.0" y="176.0" width="144" height="46" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_File_di" bpmnElement="KP_HP_17_File">
        <dc:Bounds x="400.0" y="110.0" width="160" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Preview_di" bpmnElement="KP_HP_17_Preview">
        <dc:Bounds x="630.0" y="390.0" width="160" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Readable_di" bpmnElement="KP_HP_17_Readable">
        <dc:Bounds x="915.0" y="405.0" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="868.0" y="350.0" width="144" height="46" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Review_di" bpmnElement="KP_HP_17_Review">
        <dc:Bounds x="1090.0" y="110.0" width="160" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Confirm_di" bpmnElement="KP_HP_17_Confirm">
        <dc:Bounds x="1375.0" y="125.0" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1328.0" y="70.0" width="144" height="46" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Create_di" bpmnElement="KP_HP_17_Create">
        <dc:Bounds x="1550.0" y="390.0" width="160" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Result_di" bpmnElement="KP_HP_17_Result">
        <dc:Bounds x="1842.0" y="132.0" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1788.0" y="176.0" width="144" height="46" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Invalid_di" bpmnElement="KP_HP_17_Invalid">
        <dc:Bounds x="1152.0" y="532.0" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1098.0" y="576.0" width="144" height="46" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="KP_HP_17_Cancel_di" bpmnElement="KP_HP_17_Cancel">
        <dc:Bounds x="1612.0" y="252.0" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1558.0" y="296.0" width="144" height="46" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Start_File_di" bpmnElement="KP_HP_17_Flow_Start_File">
        <di:waypoint x="268.0" y="150.0" />
        <di:waypoint x="400.0" y="150.0" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_File_Preview_di" bpmnElement="KP_HP_17_Flow_File_Preview">
        <di:waypoint x="560.0" y="150.0" />
        <di:waypoint x="584.0" y="150.0" />
        <di:waypoint x="584.0" y="430.0" />
        <di:waypoint x="630.0" y="430.0" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Preview_Readable_di" bpmnElement="KP_HP_17_Flow_Preview_Readable">
        <di:waypoint x="790.0" y="430.0" />
        <di:waypoint x="915.0" y="430.0" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Readable_Review_di" bpmnElement="KP_HP_17_Flow_Readable_Review">
        <di:waypoint x="965.0" y="430.0" />
        <di:waypoint x="1066.0" y="430.0" />
        <di:waypoint x="1066.0" y="150.0" />
        <di:waypoint x="1090.0" y="150.0" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1078.0" y="281.0" width="30" height="18" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Readable_Invalid_di" bpmnElement="KP_HP_17_Flow_Readable_Invalid">
        <di:waypoint x="965.0" y="430.0" />
        <di:waypoint x="989.0" y="430.0" />
        <di:waypoint x="989.0" y="550.0" />
        <di:waypoint x="1152.0" y="550.0" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1055.5" y="520.0" width="30" height="18" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Review_Confirm_di" bpmnElement="KP_HP_17_Flow_Review_Confirm">
        <di:waypoint x="1250.0" y="150.0" />
        <di:waypoint x="1375.0" y="150.0" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Confirm_Create_di" bpmnElement="KP_HP_17_Flow_Confirm_Create">
        <di:waypoint x="1400.0" y="175.0" />
        <di:waypoint x="1400.0" y="430.0" />
        <di:waypoint x="1550.0" y="430.0" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1412.0" y="293.5" width="30" height="18" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Confirm_Cancel_di" bpmnElement="KP_HP_17_Flow_Confirm_Cancel">
        <di:waypoint x="1425.0" y="150.0" />
        <di:waypoint x="1449.0" y="150.0" />
        <di:waypoint x="1449.0" y="270.0" />
        <di:waypoint x="1612.0" y="270.0" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1515.5" y="240.0" width="30" height="18" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="KP_HP_17_Flow_Create_Result_di" bpmnElement="KP_HP_17_Flow_Create_Result">
        <di:waypoint x="1710.0" y="430.0" />
        <di:waypoint x="1734.0" y="430.0" />
        <di:waypoint x="1734.0" y="150.0" />
        <di:waypoint x="1842.0" y="150.0" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>