<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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:camunda="http://camunda.org/schema/1.0/bpmn" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
  <bpmn2:collaboration id="Collaboration_157epcn">
    <bpmn2:participant id="Participant_11ag70j" processRef="Process_1" />
  </bpmn2:collaboration>
  <bpmn2:process id="Process_1" isExecutable="false">
    <bpmn2:scriptTask id="Activity_0e7kv35" name="Script">
      <bpmn2:incoming>Flow_0cdf82b</bpmn2:incoming>
      <bpmn2:outgoing>Flow_1plxf7i</bpmn2:outgoing>
    </bpmn2:scriptTask>
    <bpmn2:startEvent id="StartEvent_1">
      <bpmn2:outgoing>Flow_0cdf82b</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:intermediateThrowEvent id="Event_07suegq" name="Signal-103">
      <bpmn2:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">this.context.messageMatchingKey={"data.clientId":101};</camunda:script>
        </camunda:executionListener>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_1w9irs2</bpmn2:incoming>
      <bpmn2:outgoing>Flow_18sqtjr</bpmn2:outgoing>
      <bpmn2:signalEventDefinition id="SignalEventDefinition_07b5l89" signalRef="Signal_1mmbd4z" />
    </bpmn2:intermediateThrowEvent>
    <bpmn2:sequenceFlow id="Flow_1plxf7i" sourceRef="Activity_0e7kv35" targetRef="Event_190dv7t" />
    <bpmn2:sequenceFlow id="Flow_0cdf82b" sourceRef="StartEvent_1" targetRef="Activity_0e7kv35" />
    <bpmn2:sequenceFlow id="Flow_0uncxrt" sourceRef="Event_097goil" targetRef="Event_1cb4pzi" />
    <bpmn2:sequenceFlow id="Flow_18sqtjr" sourceRef="Event_07suegq" targetRef="Event_14e4p87" />
    <bpmn2:intermediateThrowEvent id="Event_14e4p87" name="Message-104">
      <bpmn2:extensionElements>
        <camunda:executionListener event="start">
          <camunda:script scriptFormat="JavaScript">this.context.messageMatchingKey={"data.clientId":101 , "data.caseId": data.caseId };</camunda:script>
        </camunda:executionListener>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_18sqtjr</bpmn2:incoming>
      <bpmn2:outgoing>Flow_12vwsi3</bpmn2:outgoing>
      <bpmn2:messageEventDefinition id="MessageEventDefinition_1ps18b2" messageRef="Message_0wgmc6e" camunda:delegateExpression="service1" />
    </bpmn2:intermediateThrowEvent>
    <bpmn2:sequenceFlow id="Flow_12vwsi3" sourceRef="Event_14e4p87" targetRef="Event_029t7ee" />
    <bpmn2:sequenceFlow id="Flow_1w9irs2" sourceRef="Event_1cb4pzi" targetRef="Event_07suegq" />
    <bpmn2:intermediateThrowEvent id="Event_190dv7t" name="Signal-10">
      <bpmn2:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="caseId">$data.caseId</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_1plxf7i</bpmn2:incoming>
      <bpmn2:outgoing>Flow_09og6lr</bpmn2:outgoing>
      <bpmn2:signalEventDefinition id="SignalEventDefinition_0be5z8q" signalRef="Signal_0fj0agj" />
    </bpmn2:intermediateThrowEvent>
    <bpmn2:intermediateCatchEvent id="Event_1cb4pzi">
      <bpmn2:incoming>Flow_0uncxrt</bpmn2:incoming>
      <bpmn2:outgoing>Flow_1w9irs2</bpmn2:outgoing>
      <bpmn2:timerEventDefinition id="TimerEventDefinition_1p86no0">
        <bpmn2:timeDuration xsi:type="bpmn2:tFormalExpression">PT5S</bpmn2:timeDuration>
      </bpmn2:timerEventDefinition>
    </bpmn2:intermediateCatchEvent>
    <bpmn2:sequenceFlow id="Flow_1sbizfa" sourceRef="Event_029t7ee" targetRef="Event_1caeuws" />
    <bpmn2:endEvent id="Event_1caeuws">
      <bpmn2:incoming>Flow_1sbizfa</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:intermediateThrowEvent id="Event_029t7ee" name="Message-105">
      <bpmn2:incoming>Flow_12vwsi3</bpmn2:incoming>
      <bpmn2:outgoing>Flow_1sbizfa</bpmn2:outgoing>
      <bpmn2:messageEventDefinition id="MessageEventDefinition_0jpkav1" messageRef="Message_0nok4r9" camunda:delegateExpression="" />
    </bpmn2:intermediateThrowEvent>
    <bpmn2:sequenceFlow id="Flow_09og6lr" sourceRef="Event_190dv7t" targetRef="Event_097goil" />
    <bpmn2:intermediateThrowEvent id="Event_097goil" name="Signal-102">
      <bpmn2:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="caseId">$data.caseId</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn2:extensionElements>
      <bpmn2:incoming>Flow_09og6lr</bpmn2:incoming>
      <bpmn2:outgoing>Flow_0uncxrt</bpmn2:outgoing>
      <bpmn2:signalEventDefinition id="SignalEventDefinition_020dksi" signalRef="Signal_10pv686" />
    </bpmn2:intermediateThrowEvent>
    <bpmn2:textAnnotation id="TextAnnotation_1bro64x">
      <bpmn2:text>output: caseId = data.caseId</bpmn2:text>
    </bpmn2:textAnnotation>
    <bpmn2:textAnnotation id="TextAnnotation_09wpd67">
      <bpmn2:text>output: caseId=data.caseId</bpmn2:text>
    </bpmn2:textAnnotation>
    <bpmn2:association id="Association_1qp2dje" sourceRef="Event_190dv7t" targetRef="TextAnnotation_1bro64x" />
    <bpmn2:association id="Association_140k4j3" sourceRef="Event_097goil" targetRef="TextAnnotation_09wpd67" />
  </bpmn2:process>
  <bpmn2:signal id="Signal_0fj0agj" name="Signal-101" />
  <bpmn2:signal id="Signal_10pv686" name="Signal-102" />
  <bpmn2:message id="Message_16aaz57" name="confirmSignal" />
  <bpmn2:signal id="Signal_1mmbd4z" name="Signal-103" />
  <bpmn2:message id="Message_0wgmc6e" name="Message-104" />
  <bpmn2:message id="Message_0nok4r9" name="Message-105" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_157epcn">
      <bpmndi:BPMNShape id="Participant_11ag70j_di" bpmnElement="Participant_11ag70j" isHorizontal="true">
        <dc:Bounds x="220" y="110" width="698" height="240" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_09og6lr_di" bpmnElement="Flow_09og6lr">
        <di:waypoint x="508" y="210" />
        <di:waypoint x="547" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1sbizfa_di" bpmnElement="Flow_1sbizfa">
        <di:waypoint x="798" y="290" />
        <di:waypoint x="852" y="290" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1w9irs2_di" bpmnElement="Flow_1w9irs2">
        <di:waypoint x="648" y="210" />
        <di:waypoint x="682" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_12vwsi3_di" bpmnElement="Flow_12vwsi3">
        <di:waypoint x="718" y="290" />
        <di:waypoint x="762" y="290" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18sqtjr_di" bpmnElement="Flow_18sqtjr">
        <di:waypoint x="700" y="228" />
        <di:waypoint x="700" y="272" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0uncxrt_di" bpmnElement="Flow_0uncxrt">
        <di:waypoint x="583" y="210" />
        <di:waypoint x="612" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0cdf82b_di" bpmnElement="Flow_0cdf82b">
        <di:waypoint x="308" y="210" />
        <di:waypoint x="340" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1plxf7i_di" bpmnElement="Flow_1plxf7i">
        <di:waypoint x="440" y="210" />
        <di:waypoint x="472" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Activity_0qvvenf_di" bpmnElement="Activity_0e7kv35">
        <dc:Bounds x="340" y="170" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="272" y="192" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1cv7obt_di" bpmnElement="Event_07suegq">
        <dc:Bounds x="682" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="673" y="168" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0vizq5u_di" bpmnElement="Event_14e4p87">
        <dc:Bounds x="682" y="272" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="666" y="315" width="68" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_01f9goy_di" bpmnElement="Event_190dv7t">
        <dc:Bounds x="472" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="466" y="168" width="47" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1yvzyzk_di" bpmnElement="Event_1cb4pzi">
        <dc:Bounds x="612" y="192" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1caeuws_di" bpmnElement="Event_1caeuws">
        <dc:Bounds x="852" y="272" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0fbkvxr_di" bpmnElement="Event_029t7ee">
        <dc:Bounds x="762" y="272" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="747" y="315" width="67" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="TextAnnotation_1bro64x_di" bpmnElement="TextAnnotation_1bro64x">
        <dc:Bounds x="450" y="130" width="100" height="41" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="TextAnnotation_09wpd67_di" bpmnElement="TextAnnotation_09wpd67">
        <dc:Bounds x="600" y="130" width="100" height="55" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_07x8rkk_di" bpmnElement="Event_097goil">
        <dc:Bounds x="547" y="192" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="538.5" y="238" width="53" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Association_1qp2dje_di" bpmnElement="Association_1qp2dje">
        <di:waypoint x="493" y="192" />
        <di:waypoint x="497" y="171" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Association_140k4j3_di" bpmnElement="Association_140k4j3">
        <di:waypoint x="583" y="210" />
        <di:waypoint x="647" y="210" />
        <di:waypoint x="647" y="185" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>
