<?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="IntermediateConditionalCatchEventSample_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
  <bpmn:collaboration id="Collaboration_1cidyxu" name="">
    <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_0l8s4w3" sourceRef="SendTaskSendConfirmation" targetRef="Participant_0xlr2dz" />
    <bpmn:messageFlow id="Flow_1y5kuk0" sourceRef="Participant_0xlr2dz" targetRef="ReceivedSupportRequestFromCustomerStartEvent" />
  </bpmn:collaboration>
  <bpmn:process id="Intermediate_Conditional_Catch_Event_Example_Process" name="Produkt Hotline" isExecutable="true">
    <bpmn:laneSet>
      <bpmn:lane id="Lane_1xzf0d3" name="Support Team">
        <bpmn:flowNodeRef>ReviewConfirmationMessage</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>SendTaskSendConfirmation</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_0pnu4s1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_1klujzh</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_17svnnm</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ReceivedSupportRequestFromCustomerStartEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>CheckMailServerTimeout</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>RequestProcessedCondition</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>CheckMailServerStatus</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>CreateTicket</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_14jzja2</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_1214azw</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>RequestWasNotProcessedEndEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>RequestWasProcessedSuccessfullyEndEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_002efw2</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <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" customForm="{&#34;multiline&#34;:&#34;true&#34;}" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1jrd8e9</bpmn:incoming>
      <bpmn:outgoing>Flow_1ov70rn</bpmn:outgoing>
    </bpmn:userTask>
    <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_1ov70rn</bpmn:incoming>
      <bpmn:outgoing>Flow_13czmcm</bpmn:outgoing>
    </bpmn:sendTask>
    <bpmn:eventBasedGateway id="Gateway_0pnu4s1">
      <bpmn:incoming>Flow_10uxq4f</bpmn:incoming>
      <bpmn:outgoing>Flow_1k71v50</bpmn:outgoing>
      <bpmn:outgoing>Flow_0ejlpkb</bpmn:outgoing>
    </bpmn:eventBasedGateway>
    <bpmn:exclusiveGateway id="Gateway_1klujzh">
      <bpmn:incoming>Flow_0krlt6y</bpmn:incoming>
      <bpmn:incoming>Flow_0juyjsy</bpmn:incoming>
      <bpmn:outgoing>Flow_10uxq4f</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:parallelGateway id="Gateway_17svnnm">
      <bpmn:incoming>Flow_0e89gye</bpmn:incoming>
      <bpmn:outgoing>Flow_0krlt6y</bpmn:outgoing>
      <bpmn:outgoing>Flow_1l2zcsm</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:startEvent id="ReceivedSupportRequestFromCustomerStartEvent" name="Supportanfrage erhalten">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="studio.defaultCustomStartToken" value="{&#10;    &#34;customerId&#34;: 1234566,&#10;    &#34;requestId&#34;: 123123123&#10;}" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:outgoing>Flow_0e89gye</bpmn:outgoing>
      <bpmn:messageEventDefinition id="MessageEventDefinition_1irn0eh" messageRef="Message_nDDBRSnn" />
    </bpmn:startEvent>
    <bpmn:intermediateCatchEvent id="CheckMailServerTimeout" name="Alle 5 Sekunden">
      <bpmn:incoming>Flow_0ejlpkb</bpmn:incoming>
      <bpmn:outgoing>Flow_0d9dv60</bpmn:outgoing>
      <bpmn:timerEventDefinition id="TimerEventDefinition_0od5hwd">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT5S</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:intermediateCatchEvent>
    <bpmn:intermediateCatchEvent id="RequestProcessedCondition" name="Bestätigung verschickt">
      <bpmn:incoming>Flow_1k71v50</bpmn:incoming>
      <bpmn:outgoing>Flow_09xe4hm</bpmn:outgoing>
      <bpmn:conditionalEventDefinition id="ConditionalEventDefinition_0ils7ej">
        <bpmn:condition xsi:type="bpmn:tFormalExpression">token.history.SendTaskSendConfirmation?.requestProcessed === true;</bpmn:condition>
      </bpmn:conditionalEventDefinition>
    </bpmn:intermediateCatchEvent>
    <bpmn:serviceTask id="CheckMailServerStatus" name="Mail Server Status abfragen">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="engine.runPostScript" value="return {&#10;    serverIsOnline: true&#10;}" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0d9dv60</bpmn:incoming>
      <bpmn:outgoing>Flow_0lzx84v</bpmn:outgoing>
    </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_1l2zcsm</bpmn:incoming>
      <bpmn:outgoing>Flow_1jrd8e9</bpmn:outgoing>
    </bpmn:serviceTask>
    <bpmn:exclusiveGateway id="Gateway_14jzja2" name="Server online?" default="Flow_0juyjsy">
      <bpmn:incoming>Flow_0lzx84v</bpmn:incoming>
      <bpmn:outgoing>Flow_0juyjsy</bpmn:outgoing>
      <bpmn:outgoing>Flow_1xj3lxv</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <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_1xj3lxv</bpmn:incoming>
      <bpmn:outgoing>Flow_1mua753</bpmn:outgoing>
      <bpmn:signalEventDefinition id="SignalEventDefinition_1pdhbva" signalRef="Signal_nvYIZt99" />
    </bpmn:intermediateThrowEvent>
    <bpmn:endEvent id="RequestWasNotProcessedEndEvent" name="Anfrage nicht bearbeitet">
      <bpmn:incoming>Flow_1mua753</bpmn:incoming>
      <bpmn:errorEventDefinition id="ErrorEventDefinition_07v50ec" errorRef="Error_wyOHgHwo" />
    </bpmn:endEvent>
    <bpmn:endEvent id="RequestWasProcessedSuccessfullyEndEvent" name="Anfrage erhalten und verarbeitet">
      <bpmn:incoming>Flow_13czmcm</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:endEvent id="Event_002efw2">
      <bpmn:incoming>Flow_09xe4hm</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1jrd8e9" sourceRef="CreateTicket" targetRef="ReviewConfirmationMessage" />
    <bpmn:sequenceFlow id="Flow_1ov70rn" sourceRef="ReviewConfirmationMessage" targetRef="SendTaskSendConfirmation" />
    <bpmn:sequenceFlow id="Flow_13czmcm" sourceRef="SendTaskSendConfirmation" targetRef="RequestWasProcessedSuccessfullyEndEvent" />
    <bpmn:sequenceFlow id="Flow_10uxq4f" sourceRef="Gateway_1klujzh" targetRef="Gateway_0pnu4s1" />
    <bpmn:sequenceFlow id="Flow_1k71v50" sourceRef="Gateway_0pnu4s1" targetRef="RequestProcessedCondition" />
    <bpmn:sequenceFlow id="Flow_0ejlpkb" sourceRef="Gateway_0pnu4s1" targetRef="CheckMailServerTimeout" />
    <bpmn:sequenceFlow id="Flow_0krlt6y" sourceRef="Gateway_17svnnm" targetRef="Gateway_1klujzh" />
    <bpmn:sequenceFlow id="Flow_0juyjsy" name="Ja" sourceRef="Gateway_14jzja2" targetRef="Gateway_1klujzh" />
    <bpmn:sequenceFlow id="Flow_0e89gye" sourceRef="ReceivedSupportRequestFromCustomerStartEvent" targetRef="Gateway_17svnnm" />
    <bpmn:sequenceFlow id="Flow_1l2zcsm" sourceRef="Gateway_17svnnm" targetRef="CreateTicket" />
    <bpmn:sequenceFlow id="Flow_0d9dv60" sourceRef="CheckMailServerTimeout" targetRef="CheckMailServerStatus" />
    <bpmn:sequenceFlow id="Flow_09xe4hm" sourceRef="RequestProcessedCondition" targetRef="Event_002efw2" />
    <bpmn:sequenceFlow id="Flow_0lzx84v" sourceRef="CheckMailServerStatus" targetRef="Gateway_14jzja2" />
    <bpmn:sequenceFlow id="Flow_1xj3lxv" name="Nein" sourceRef="Gateway_14jzja2" targetRef="Event_1214azw">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">token.current.serverIsOnline === false;</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_1mua753" sourceRef="Event_1214azw" targetRef="RequestWasNotProcessedEndEvent" />
  </bpmn:process>
  <bpmn:error id="Error_wyOHgHwo" errorCode="123456" camunda:errorMessage="Request was not processed, because the mail server was down" />
  <bpmn:message id="Message_IySD6ZII" name="SendRequestReceivedConfirmation" />
  <bpmn:signal id="Signal_nvYIZt99" name="MailServerIsDownSignal" />
  <bpmn:message id="Message_nDDBRSnn" name="ReceivedSupportRequestFromCustomer" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
      <bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Intermediate_Conditional_Catch_Event_Example_Participant" isHorizontal="true">
        <dc:Bounds x="5" y="-50" width="1085" height="490" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
        <dc:Bounds x="35" y="-50" width="1055" height="490" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0imibet_di" bpmnElement="ReviewConfirmationMessage">
        <dc:Bounds x="490" y="330" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0vp307z_di" bpmnElement="SendTaskSendConfirmation">
        <dc:Bounds x="670" y="330" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_0i8ui7r_di" bpmnElement="Gateway_0pnu4s1">
        <dc:Bounds x="385" y="105" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_1klujzh_di" bpmnElement="Gateway_1klujzh" isMarkerVisible="true">
        <dc:Bounds x="295" y="105" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_1wamsr5_di" bpmnElement="Gateway_17svnnm">
        <dc:Bounds x="205" y="105" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0d7h1p7_di" bpmnElement="ReceivedSupportRequestFromCustomerStartEvent">
        <dc:Bounds x="102" y="112" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="82" y="75" width="76" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_13n9l27_di" bpmnElement="CheckMailServerTimeout">
        <dc:Bounds x="522" y="42" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="500" y="85" width="81" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1wdvfh9_di" bpmnElement="RequestProcessedCondition">
        <dc:Bounds x="522" y="182" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="511" y="225" width="59" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1uez7v1_di" bpmnElement="CheckMailServerStatus">
        <dc:Bounds x="640" y="20" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_181n3au_di" bpmnElement="CreateTicket">
        <dc:Bounds x="320" y="330" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_14jzja2_di" bpmnElement="Gateway_14jzja2" isMarkerVisible="true">
        <dc:Bounds x="805" y="35" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="795" y="92" width="71" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1ogomad_di" bpmnElement="Event_1214azw">
        <dc:Bounds x="902" y="42" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="885" y="85" width="71" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1pavnia_di" bpmnElement="RequestWasNotProcessedEndEvent">
        <dc:Bounds x="1012" y="42" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="998" y="85" width="65" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0h7ptuw_di" bpmnElement="RequestWasProcessedSuccessfullyEndEvent">
        <dc:Bounds x="1012" y="352" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="989" y="395" width="82" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_002efw2_di" bpmnElement="Event_002efw2">
        <dc:Bounds x="1012" y="182" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1jrd8e9_di" bpmnElement="Flow_1jrd8e9">
        <di:waypoint x="420" y="370" />
        <di:waypoint x="490" y="370" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1ov70rn_di" bpmnElement="Flow_1ov70rn">
        <di:waypoint x="590" y="370" />
        <di:waypoint x="670" y="370" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_13czmcm_di" bpmnElement="Flow_13czmcm">
        <di:waypoint x="770" y="370" />
        <di:waypoint x="1012" y="370" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_10uxq4f_di" bpmnElement="Flow_10uxq4f">
        <di:waypoint x="345" y="130" />
        <di:waypoint x="385" y="130" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1k71v50_di" bpmnElement="Flow_1k71v50">
        <di:waypoint x="410" y="155" />
        <di:waypoint x="410" y="200" />
        <di:waypoint x="522" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0ejlpkb_di" bpmnElement="Flow_0ejlpkb">
        <di:waypoint x="410" y="105" />
        <di:waypoint x="410" y="60" />
        <di:waypoint x="522" y="60" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0krlt6y_di" bpmnElement="Flow_0krlt6y">
        <di:waypoint x="255" y="130" />
        <di:waypoint x="295" y="130" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0juyjsy_di" bpmnElement="Flow_0juyjsy">
        <di:waypoint x="830" y="35" />
        <di:waypoint x="830" y="-20" />
        <di:waypoint x="320" y="-20" />
        <di:waypoint x="320" y="105" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="803" y="21" width="13" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0e89gye_di" bpmnElement="Flow_0e89gye">
        <di:waypoint x="138" y="130" />
        <di:waypoint x="205" y="130" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1l2zcsm_di" bpmnElement="Flow_1l2zcsm">
        <di:waypoint x="230" y="155" />
        <di:waypoint x="230" y="370" />
        <di:waypoint x="320" y="370" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0d9dv60_di" bpmnElement="Flow_0d9dv60">
        <di:waypoint x="558" y="60" />
        <di:waypoint x="640" y="60" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_09xe4hm_di" bpmnElement="Flow_09xe4hm">
        <di:waypoint x="558" y="200" />
        <di:waypoint x="1012" y="200" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0lzx84v_di" bpmnElement="Flow_0lzx84v">
        <di:waypoint x="740" y="60" />
        <di:waypoint x="805" y="60" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1xj3lxv_di" bpmnElement="Flow_1xj3lxv">
        <di:waypoint x="855" y="60" />
        <di:waypoint x="902" y="60" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="867" y="42" width="23" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1mua753_di" bpmnElement="Flow_1mua753">
        <di:waypoint x="938" y="60" />
        <di:waypoint x="1012" y="60" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Participant_1jghdsz_di" bpmnElement="Participant_0xlr2dz" isHorizontal="true">
        <dc:Bounds x="80" y="500" width="830" height="60" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_0l8s4w3_di" bpmnElement="Flow_0l8s4w3">
        <di:waypoint x="720" y="410" />
        <di:waypoint x="720" y="500" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1y5kuk0_di" bpmnElement="Flow_1y5kuk0">
        <di:waypoint x="120" y="500" />
        <di:waypoint x="120" y="148" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
