<?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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="asdasdasd_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
  <bpmn:collaboration id="Collaboration_0f9adth">
    <bpmn:participant id="Intermediate_Conditional_Catch_Event_Example_Participant" name="Produkt Hotline" processRef="Intermediate_Conditional_Catch_Event_Example_Process" />
    <bpmn:participant id="Participant_0xlr2dz" name="Mail Server" />
    <bpmn:messageFlow id="Flow_1y5kuk0" sourceRef="Participant_0xlr2dz" targetRef="ReceivedSupportRequestFromCustomerStartEvent" />
    <bpmn:messageFlow id="Flow_0uj5vb6" sourceRef="SendTaskSendConfirmation" targetRef="Participant_0xlr2dz" />
    <bpmn:textAnnotation id="TextAnnotation_0u4lnw9">
      <bpmn:text>Wiederholt alle 5 Sekunden</bpmn:text>
    </bpmn:textAnnotation>
  </bpmn:collaboration>
  <bpmn:process id="Intermediate_Conditional_Catch_Event_Example_Process" name="Produkt Hotline" isExecutable="true">
    <bpmn:laneSet id="LaneSet_1rnkte3">
      <bpmn:lane id="Lane_035pq6y" name="Support Team">
        <bpmn:flowNodeRef>Gateway_17svnnm</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ReceivedSupportRequestFromCustomerStartEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>CheckMailServerRepeatedly</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>CreateTicket</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>SendTaskSendConfirmation</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>MailServerDownCondition</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>RequestWasNotProcessedEndEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_1214azw</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ReviewConfirmationMessage</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>RequestWasProcessedSuccessfullyEndEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_0pswu90</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:parallelGateway id="Gateway_17svnnm">
      <bpmn:incoming>Flow_0e89gye</bpmn:incoming>
      <bpmn:outgoing>Flow_07i0jrs</bpmn:outgoing>
      <bpmn:outgoing>Flow_0l301iv</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:startEvent id="ReceivedSupportRequestFromCustomerStartEvent" name="Supportanfrage erhalten">
      <bpmn:outgoing>Flow_0e89gye</bpmn:outgoing>
      <bpmn:messageEventDefinition id="MessageEventDefinition_1irn0eh" messageRef="Message_smn2snlJ" />
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_0e89gye" sourceRef="ReceivedSupportRequestFromCustomerStartEvent" targetRef="Gateway_17svnnm" />
    <bpmn:sequenceFlow id="Flow_07i0jrs" sourceRef="Gateway_17svnnm" targetRef="CheckMailServerRepeatedly" />
    <bpmn:sequenceFlow id="Flow_0y9i6w6" sourceRef="Event_1214azw" targetRef="RequestWasNotProcessedEndEvent" />
    <bpmn:sequenceFlow id="Flow_0w6q6sb" sourceRef="CreateTicket" targetRef="ReviewConfirmationMessage" />
    <bpmn:sequenceFlow id="Flow_1wc8qvt" sourceRef="ReviewConfirmationMessage" targetRef="SendTaskSendConfirmation" />
    <bpmn:sequenceFlow id="Flow_0l301iv" sourceRef="Gateway_17svnnm" targetRef="CreateTicket" />
    <bpmn:sequenceFlow id="Flow_1hbr40c" sourceRef="CheckMailServerRepeatedly" targetRef="Event_1214azw" />
    <bpmn:serviceTask id="CheckMailServerRepeatedly" name="Mail Server Status Check">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="engine.setTimeoutBetweenLoopIterations" value="5000" />
          <camunda:property name="engine.setLoopBreakCondition" value="token.current.serverDown === true" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_07i0jrs</bpmn:incoming>
      <bpmn:outgoing>Flow_1hbr40c</bpmn:outgoing>
      <bpmn:standardLoopCharacteristics />
    </bpmn:serviceTask>
    <bpmn:serviceTask id="CreateTicket" name="Ticket erstellen">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="engine.runPostScript" value="{&#10;    ticketId: 11234&#10;}" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0l301iv</bpmn:incoming>
      <bpmn:outgoing>Flow_0w6q6sb</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:sendTask id="SendTaskSendConfirmation" name="Bestätigung verschicken" messageRef="Message_IySD6ZII">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="engine.runPostScript" value="return {&#10;    requestProcessed: true&#10;}" />
          <camunda:property name="payload" value="{&#10;    ticketId: token.history.CreateTicket.ticketId,&#10;    responseMesssage: token.history.ReviewConfirmationMessage.ResponseMessage&#10;}" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1wc8qvt</bpmn:incoming>
      <bpmn:outgoing>Flow_0pt4ms0</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:boundaryEvent id="MailServerDownCondition" attachedToRef="CheckMailServerRepeatedly">
      <bpmn:outgoing>Flow_18cdf6j</bpmn:outgoing>
      <bpmn:conditionalEventDefinition id="ConditionalEventDefinition_18mz6zu">
        <bpmn:condition xsi:type="bpmn:tFormalExpression">token.history.SendTaskSendConfirmation?.requestProcessed === true;</bpmn:condition>
      </bpmn:conditionalEventDefinition>
    </bpmn:boundaryEvent>
    <bpmn:endEvent id="RequestWasNotProcessedEndEvent" name="Anfrage nicht bearbeitet">
      <bpmn:incoming>Flow_0y9i6w6</bpmn:incoming>
      <bpmn:errorEventDefinition id="ErrorEventDefinition_07v50ec" errorRef="Error_wyOHgHwo" />
    </bpmn:endEvent>
    <bpmn:intermediateThrowEvent id="Event_1214azw" name="Meldung an IT Support">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="inputValues" value="{&#10;    source: processInstanceMetadata.id&#10;}" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1hbr40c</bpmn:incoming>
      <bpmn:outgoing>Flow_0y9i6w6</bpmn:outgoing>
      <bpmn:signalEventDefinition id="SignalEventDefinition_1pdhbva" signalRef="Signal_nvYIZt99" />
    </bpmn:intermediateThrowEvent>
    <bpmn:userTask id="ReviewConfirmationMessage" name="Bestätigung verfassen">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="ResponseMessageTicketId" label="Ticket ID" type="string" defaultValue="${token.history.CreateTicket.ticketId}" />
          <camunda:formField id="ResponseMessage" label="Confirmation Text" type="string" defaultValue="Request was recevied and processed by our support team" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0w6q6sb</bpmn:incoming>
      <bpmn:outgoing>Flow_1wc8qvt</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:endEvent id="RequestWasProcessedSuccessfullyEndEvent" name="Anfrage erhalten und verarbeitet">
      <bpmn:incoming>Flow_0pt4ms0</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_0pt4ms0" sourceRef="SendTaskSendConfirmation" targetRef="RequestWasProcessedSuccessfullyEndEvent" />
    <bpmn:sequenceFlow id="Flow_18cdf6j" sourceRef="MailServerDownCondition" targetRef="Event_0pswu90" />
    <bpmn:endEvent id="Event_0pswu90" name="Status Check canceled">
      <bpmn:incoming>Flow_18cdf6j</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:association id="Association_0h5bp43" associationDirection="None" sourceRef="CheckMailServerRepeatedly" targetRef="TextAnnotation_0u4lnw9" />
  </bpmn:process>
  <bpmn:error id="Error_ljZUn0cj" />
  <bpmn:message id="Message_smn2snlJ" name="ReceivedSupportRequestFromCustomer" />
  <bpmn:message id="Message_2QUeca0p" name="SendRequestReceivedConfirmation" />
  <bpmn:message id="Message_IySD6ZII" name="SendRequestReceivedConfirmation" />
  <bpmn:signal id="Signal_nvYIZt99" name="MailServerIsDownSignal" />
  <bpmn:error id="Error_wyOHgHwo" errorCode="123456" camunda:errorMessage="Request was not processed, because the mail server was down" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_0f9adth">
      <bpmndi:BPMNShape id="BPMNShape_0qilu8g" bpmnElement="Intermediate_Conditional_Catch_Event_Example_Participant" isHorizontal="true">
        <dc:Bounds x="-70" y="10" width="860" height="460" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_05tonjb" bpmnElement="Lane_035pq6y" isHorizontal="true">
        <dc:Bounds x="-40" y="10" width="830" height="460" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_1wamsr5_di" bpmnElement="Gateway_17svnnm">
        <dc:Bounds x="130" y="245" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0d7h1p7_di" bpmnElement="ReceivedSupportRequestFromCustomerStartEvent">
        <dc:Bounds x="27" y="252" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="7" y="215" width="76" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0d0vz0q_di" bpmnElement="CheckMailServerRepeatedly">
        <dc:Bounds x="205" y="110" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_03wg7x9" bpmnElement="CreateTicket">
        <dc:Bounds x="205" y="340" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_17yuh14" bpmnElement="SendTaskSendConfirmation">
        <dc:Bounds x="480" y="340" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1pavnia_di" bpmnElement="RequestWasNotProcessedEndEvent">
        <dc:Bounds x="702" y="132" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="688" y="175" width="65" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1ogomad_di" bpmnElement="Event_1214azw">
        <dc:Bounds x="512" y="132" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="494" y="94.5" width="71" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_1dyu2na" bpmnElement="ReviewConfirmationMessage">
        <dc:Bounds x="340" y="340" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0h7ptuw_di" bpmnElement="RequestWasProcessedSuccessfullyEndEvent">
        <dc:Bounds x="702" y="362" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="679" y="405" width="82" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0pswu90_di" bpmnElement="Event_0pswu90">
        <dc:Bounds x="512" y="232" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="497" y="275" width="66" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Association_0h5bp43_di" bpmnElement="Association_0h5bp43">
        <di:waypoint x="243" y="110" />
        <di:waypoint x="232" y="71" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Event_0q8nj1j_di" bpmnElement="MailServerDownCondition">
        <dc:Bounds x="287" y="172" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="347" y="233" width="85" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_0e89gye_di" bpmnElement="Flow_0e89gye">
        <di:waypoint x="63" y="270" />
        <di:waypoint x="130" y="270" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_07i0jrs_di" bpmnElement="Flow_07i0jrs">
        <di:waypoint x="155" y="245" />
        <di:waypoint x="155" y="150" />
        <di:waypoint x="205" y="150" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0y9i6w6_di" bpmnElement="Flow_0y9i6w6">
        <di:waypoint x="548" y="150" />
        <di:waypoint x="702" y="150" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_1iigt0h" bpmnElement="Flow_0w6q6sb">
        <di:waypoint x="305" y="380" />
        <di:waypoint x="340" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_0cy4tk3" bpmnElement="Flow_1wc8qvt">
        <di:waypoint x="440" y="380" />
        <di:waypoint x="480" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0l301iv_di" bpmnElement="Flow_0l301iv">
        <di:waypoint x="155" y="295" />
        <di:waypoint x="155" y="380" />
        <di:waypoint x="205" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1hbr40c_di" bpmnElement="Flow_1hbr40c">
        <di:waypoint x="305" y="150" />
        <di:waypoint x="512" y="150" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0pt4ms0_di" bpmnElement="Flow_0pt4ms0">
        <di:waypoint x="580" y="380" />
        <di:waypoint x="702" y="380" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18cdf6j_di" bpmnElement="Flow_18cdf6j">
        <di:waypoint x="305" y="208" />
        <di:waypoint x="305" y="250" />
        <di:waypoint x="512" y="250" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Participant_1jghdsz_di" bpmnElement="Participant_0xlr2dz" isHorizontal="true">
        <dc:Bounds x="40" y="550" width="670" height="60" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1y5kuk0_di" bpmnElement="Flow_1y5kuk0">
        <di:waypoint x="45" y="550" />
        <di:waypoint x="45" y="288" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="TextAnnotation_0u4lnw9_di" bpmnElement="TextAnnotation_0u4lnw9">
        <dc:Bounds x="150" y="30" width="139.989406779661" height="40.67796610169491" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_0uj5vb6_di" bpmnElement="Flow_0uj5vb6">
        <di:waypoint x="530" y="420" />
        <di:waypoint x="530" y="550" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
