<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.omg.org/bpmn20" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:bpsim="http://www.bpsim.org/schemas/1.0" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:drools="http://www.jboss.org/drools" id="_IyHFgPjgEeqBWrF56ZDtLg" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.jboss.org/drools drools.xsd http://www.bpsim.org/schemas/1.0 bpsim.xsd http://www.omg.org/spec/DD/20100524/DC DC.xsd http://www.omg.org/spec/DD/20100524/DI DI.xsd " exporter="jBPM Process Modeler" exporterVersion="2.0" targetNamespace="http://www.omg.org/bpmn20">
  <bpmn2:itemDefinition id="_kafka-topicItem" structureRef="String"/>
  <bpmn2:itemDefinition id="_kafka-keyItem" structureRef="String"/>
  <bpmn2:itemDefinition id="_kafka-valueItem" structureRef="String"/>
  <bpmn2:itemDefinition id="_kafka-resultItem" structureRef="String"/>
  <bpmn2:itemDefinition id="__6780ACD2-45E8-4B50-B505-BC321258FFAC_KeyInputXItem" structureRef="String"/>
  <bpmn2:itemDefinition id="__6780ACD2-45E8-4B50-B505-BC321258FFAC_TopicInputXItem" structureRef="String"/>
  <bpmn2:itemDefinition id="__6780ACD2-45E8-4B50-B505-BC321258FFAC_ValueInputXItem" structureRef="String"/>
  <bpmn2:itemDefinition id="__6780ACD2-45E8-4B50-B505-BC321258FFAC_ResultOutputXItem" structureRef="String"/>
  <bpmn2:error id="org.jbpm.bpmn2.handler.WorkItemHandlerRuntimeException" errorCode="org.jbpm.bpmn2.handler.WorkItemHandlerRuntimeException"/>
  <bpmn2:process id="kafka-process.kafka-process" drools:packageName="com.myspace.kafka_process" drools:version="1.0" drools:adHoc="false" name="kafka-process" isExecutable="true" processType="Public">
    <bpmn2:property id="kafka-topic" itemSubjectRef="_kafka-topicItem" name="kafka-topic"/>
    <bpmn2:property id="kafka-key" itemSubjectRef="_kafka-keyItem" name="kafka-key"/>
    <bpmn2:property id="kafka-value" itemSubjectRef="_kafka-valueItem" name="kafka-value"/>
    <bpmn2:property id="kafka-result" itemSubjectRef="_kafka-resultItem" name="kafka-result"/>
    <bpmn2:sequenceFlow id="_DD7DFE8A-652D-438B-ABEA-B32A5EB23A8C" sourceRef="_CE9E3D56-5175-4D5D-98AB-4F1D41F16683" targetRef="_DD650EBE-90D5-41DC-A2C2-D4E698211AB9"/>
    <bpmn2:sequenceFlow id="_FFB05AA4-3650-493E-B34C-0C4420A274C6" sourceRef="_6780ACD2-45E8-4B50-B505-BC321258FFAC" targetRef="_38F8B2D7-FBF4-4B09-B2A1-728FA16C4443">
      <bpmn2:extensionElements>
        <drools:metaData name="isAutoConnection.target">
          <drools:metaValue><![CDATA[true]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="_BFDABDFC-A204-4B38-A180-2AAA6B9CAF29" sourceRef="_DD650EBE-90D5-41DC-A2C2-D4E698211AB9" targetRef="_8DD37B2F-7381-4E20-AC3C-3208C0DDD8FC">
      <bpmn2:extensionElements>
        <drools:metaData name="isAutoConnection.source">
          <drools:metaValue><![CDATA[true]]></drools:metaValue>
        </drools:metaData>
        <drools:metaData name="isAutoConnection.target">
          <drools:metaValue><![CDATA[true]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:sequenceFlow>
    <bpmn2:sequenceFlow id="_4021473C-6C42-4A44-91BD-4A08FD438E4D" sourceRef="_C8AE84C6-E0F6-4FCA-A6D7-75855AE7267A" targetRef="_6780ACD2-45E8-4B50-B505-BC321258FFAC">
      <bpmn2:extensionElements>
        <drools:metaData name="isAutoConnection.target">
          <drools:metaValue><![CDATA[true]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
    </bpmn2:sequenceFlow>
    <bpmn2:task id="_6780ACD2-45E8-4B50-B505-BC321258FFAC" drools:taskName="KafkaPublishMessages" name="KafkaPublishMessages">
      <bpmn2:documentation id="_IyHskPjgEeqBWrF56ZDtLg"><![CDATA[kafka-workitem/index.html]]></bpmn2:documentation>
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[KafkaPublishMessages]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>_4021473C-6C42-4A44-91BD-4A08FD438E4D</bpmn2:incoming>
      <bpmn2:outgoing>_FFB05AA4-3650-493E-B34C-0C4420A274C6</bpmn2:outgoing>
      <bpmn2:ioSpecification id="_IyHskfjgEeqBWrF56ZDtLg">
        <bpmn2:dataInput id="_6780ACD2-45E8-4B50-B505-BC321258FFAC_KeyInputX" drools:dtype="String" itemSubjectRef="__6780ACD2-45E8-4B50-B505-BC321258FFAC_KeyInputXItem" name="Key"/>
        <bpmn2:dataInput id="_6780ACD2-45E8-4B50-B505-BC321258FFAC_TopicInputX" drools:dtype="String" itemSubjectRef="__6780ACD2-45E8-4B50-B505-BC321258FFAC_TopicInputXItem" name="Topic"/>
        <bpmn2:dataInput id="_6780ACD2-45E8-4B50-B505-BC321258FFAC_ValueInputX" drools:dtype="String" itemSubjectRef="__6780ACD2-45E8-4B50-B505-BC321258FFAC_ValueInputXItem" name="Value"/>
        <bpmn2:dataInput id="_6780ACD2-45E8-4B50-B505-BC321258FFAC_TaskNameInputX" drools:dtype="Object" name="TaskName"/>
        <bpmn2:dataOutput id="_6780ACD2-45E8-4B50-B505-BC321258FFAC_ResultOutputX" drools:dtype="String" itemSubjectRef="__6780ACD2-45E8-4B50-B505-BC321258FFAC_ResultOutputXItem" name="Result"/>
        <bpmn2:inputSet id="_IyHskvjgEeqBWrF56ZDtLg">
          <bpmn2:dataInputRefs>_6780ACD2-45E8-4B50-B505-BC321258FFAC_KeyInputX</bpmn2:dataInputRefs>
          <bpmn2:dataInputRefs>_6780ACD2-45E8-4B50-B505-BC321258FFAC_TopicInputX</bpmn2:dataInputRefs>
          <bpmn2:dataInputRefs>_6780ACD2-45E8-4B50-B505-BC321258FFAC_ValueInputX</bpmn2:dataInputRefs>
          <bpmn2:dataInputRefs>_6780ACD2-45E8-4B50-B505-BC321258FFAC_TaskNameInputX</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet id="_IyHsk_jgEeqBWrF56ZDtLg">
          <bpmn2:dataOutputRefs>_6780ACD2-45E8-4B50-B505-BC321258FFAC_ResultOutputX</bpmn2:dataOutputRefs>
        </bpmn2:outputSet>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation id="_IyHslPjgEeqBWrF56ZDtLg">
        <bpmn2:sourceRef>kafka-key</bpmn2:sourceRef>
        <bpmn2:targetRef>_6780ACD2-45E8-4B50-B505-BC321258FFAC_KeyInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataInputAssociation id="_IyHslfjgEeqBWrF56ZDtLg">
        <bpmn2:sourceRef>kafka-topic</bpmn2:sourceRef>
        <bpmn2:targetRef>_6780ACD2-45E8-4B50-B505-BC321258FFAC_TopicInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataInputAssociation id="_IyHslvjgEeqBWrF56ZDtLg">
        <bpmn2:sourceRef>kafka-value</bpmn2:sourceRef>
        <bpmn2:targetRef>_6780ACD2-45E8-4B50-B505-BC321258FFAC_ValueInputX</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataInputAssociation id="_IyHsl_jgEeqBWrF56ZDtLg">
        <bpmn2:targetRef>_6780ACD2-45E8-4B50-B505-BC321258FFAC_TaskNameInputX</bpmn2:targetRef>
        <bpmn2:assignment id="_IyHsmPjgEeqBWrF56ZDtLg">
          <bpmn2:from xsi:type="bpmn2:tFormalExpression" id="_IyHsmfjgEeqBWrF56ZDtLg"><![CDATA[KafkaPublishMessages]]></bpmn2:from>
          <bpmn2:to xsi:type="bpmn2:tFormalExpression" id="_IyHsmvjgEeqBWrF56ZDtLg">_6780ACD2-45E8-4B50-B505-BC321258FFAC_TaskNameInputX</bpmn2:to>
        </bpmn2:assignment>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataOutputAssociation id="_IyHsm_jgEeqBWrF56ZDtLg">
        <bpmn2:sourceRef>_6780ACD2-45E8-4B50-B505-BC321258FFAC_ResultOutputX</bpmn2:sourceRef>
        <bpmn2:targetRef>kafka-result</bpmn2:targetRef>
      </bpmn2:dataOutputAssociation>
    </bpmn2:task>
    <bpmn2:scriptTask id="_DD650EBE-90D5-41DC-A2C2-D4E698211AB9" name="TaskErrorAfterKafkaMessageSent" scriptFormat="http://www.java.com/java">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[TaskErrorAfterKafkaMessageSent]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>_DD7DFE8A-652D-438B-ABEA-B32A5EB23A8C</bpmn2:incoming>
      <bpmn2:outgoing>_BFDABDFC-A204-4B38-A180-2AAA6B9CAF29</bpmn2:outgoing>
      <bpmn2:script><![CDATA[System.out.println("Error in kafka WIH");
kcontext.setVariable("kafka-result","failure");]]></bpmn2:script>
    </bpmn2:scriptTask>
    <bpmn2:endEvent id="_38F8B2D7-FBF4-4B09-B2A1-728FA16C4443" name="End">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[End]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:incoming>_FFB05AA4-3650-493E-B34C-0C4420A274C6</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:endEvent id="_8DD37B2F-7381-4E20-AC3C-3208C0DDD8FC">
      <bpmn2:incoming>_BFDABDFC-A204-4B38-A180-2AAA6B9CAF29</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:startEvent id="_C8AE84C6-E0F6-4FCA-A6D7-75855AE7267A" name="Start">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[Start]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:outgoing>_4021473C-6C42-4A44-91BD-4A08FD438E4D</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:boundaryEvent id="_CE9E3D56-5175-4D5D-98AB-4F1D41F16683" drools:boundaryca="true" drools:dockerinfo="121.9^74.0|" name="BoundaryError" attachedToRef="_6780ACD2-45E8-4B50-B505-BC321258FFAC">
      <bpmn2:extensionElements>
        <drools:metaData name="elementname">
          <drools:metaValue><![CDATA[BoundaryError]]></drools:metaValue>
        </drools:metaData>
      </bpmn2:extensionElements>
      <bpmn2:outgoing>_DD7DFE8A-652D-438B-ABEA-B32A5EB23A8C</bpmn2:outgoing>
      <bpmn2:errorEventDefinition id="_IyHsnPjgEeqBWrF56ZDtLg" drools:erefname="org.jbpm.bpmn2.handler.WorkItemHandlerRuntimeException" errorRef="org.jbpm.bpmn2.handler.WorkItemHandlerRuntimeException"/>
    </bpmn2:boundaryEvent>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="_IyHsnfjgEeqBWrF56ZDtLg">
    <bpmndi:BPMNPlane id="_IyHsnvjgEeqBWrF56ZDtLg" bpmnElement="kafka-process.kafka-process">
      <bpmndi:BPMNShape id="shape__C8AE84C6-E0F6-4FCA-A6D7-75855AE7267A" bpmnElement="_C8AE84C6-E0F6-4FCA-A6D7-75855AE7267A">
        <dc:Bounds height="56.0" width="56.0" x="161.0" y="137.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__8DD37B2F-7381-4E20-AC3C-3208C0DDD8FC" bpmnElement="_8DD37B2F-7381-4E20-AC3C-3208C0DDD8FC">
        <dc:Bounds height="56.0" width="56.0" x="586.0" y="305.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__38F8B2D7-FBF4-4B09-B2A1-728FA16C4443" bpmnElement="_38F8B2D7-FBF4-4B09-B2A1-728FA16C4443">
        <dc:Bounds height="56.0" width="56.0" x="489.0" y="137.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__CE9E3D56-5175-4D5D-98AB-4F1D41F16683" bpmnElement="_CE9E3D56-5175-4D5D-98AB-4F1D41F16683">
        <dc:Bounds height="56.0" width="56.0" x="383.9" y="188.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__DD650EBE-90D5-41DC-A2C2-D4E698211AB9" bpmnElement="_DD650EBE-90D5-41DC-A2C2-D4E698211AB9">
        <dc:Bounds height="102.0" width="154.0" x="335.0" y="282.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape__6780ACD2-45E8-4B50-B505-BC321258FFAC" bpmnElement="_6780ACD2-45E8-4B50-B505-BC321258FFAC">
        <dc:Bounds height="102.0" width="154.0" x="262.0" y="114.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge_shape__C8AE84C6-E0F6-4FCA-A6D7-75855AE7267A_to_shape__6780ACD2-45E8-4B50-B505-BC321258FFAC" bpmnElement="_4021473C-6C42-4A44-91BD-4A08FD438E4D">
        <di:waypoint xsi:type="dc:Point" x="189.0" y="165.0"/>
        <di:waypoint xsi:type="dc:Point" x="262.0" y="165.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__DD650EBE-90D5-41DC-A2C2-D4E698211AB9_to_shape__8DD37B2F-7381-4E20-AC3C-3208C0DDD8FC" bpmnElement="_BFDABDFC-A204-4B38-A180-2AAA6B9CAF29">
        <di:waypoint xsi:type="dc:Point" x="489.0" y="333.0"/>
        <di:waypoint xsi:type="dc:Point" x="586.0" y="333.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__6780ACD2-45E8-4B50-B505-BC321258FFAC_to_shape__38F8B2D7-FBF4-4B09-B2A1-728FA16C4443" bpmnElement="_FFB05AA4-3650-493E-B34C-0C4420A274C6">
        <di:waypoint xsi:type="dc:Point" x="339.0" y="165.0"/>
        <di:waypoint xsi:type="dc:Point" x="566.0" y="137.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge_shape__CE9E3D56-5175-4D5D-98AB-4F1D41F16683_to_shape__DD650EBE-90D5-41DC-A2C2-D4E698211AB9" bpmnElement="_DD7DFE8A-652D-438B-ABEA-B32A5EB23A8C">
        <di:waypoint xsi:type="dc:Point" x="411.9" y="216.0"/>
        <di:waypoint xsi:type="dc:Point" x="412.0" y="282.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
  <bpmn2:relationship id="_IyHsn_jgEeqBWrF56ZDtLg" type="BPSimData">
    <bpmn2:extensionElements>
      <bpsim:BPSimData>
        <bpsim:Scenario xsi:type="bpsim:Scenario" id="default" name="Simulationscenario">
          <bpsim:ScenarioParameters xsi:type="bpsim:ScenarioParameters"/>
          <bpsim:ElementParameters xsi:type="bpsim:ElementParameters" elementRef="_C8AE84C6-E0F6-4FCA-A6D7-75855AE7267A" id="_IyHsoPjgEeqBWrF56ZDtLg">
            <bpsim:TimeParameters xsi:type="bpsim:TimeParameters">
              <bpsim:ProcessingTime xsi:type="bpsim:Parameter">
                <bpsim:NormalDistribution mean="0.0" standardDeviation="0.0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
          </bpsim:ElementParameters>
          <bpsim:ElementParameters xsi:type="bpsim:ElementParameters" elementRef="_DD650EBE-90D5-41DC-A2C2-D4E698211AB9" id="_IyHsofjgEeqBWrF56ZDtLg">
            <bpsim:TimeParameters xsi:type="bpsim:TimeParameters">
              <bpsim:ProcessingTime xsi:type="bpsim:Parameter">
                <bpsim:NormalDistribution mean="0.0" standardDeviation="0.0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
            <bpsim:ResourceParameters xsi:type="bpsim:ResourceParameters">
              <bpsim:Availability xsi:type="bpsim:Parameter">
                <bpsim:FloatingParameter value="0.0"/>
              </bpsim:Availability>
              <bpsim:Quantity xsi:type="bpsim:Parameter">
                <bpsim:FloatingParameter value="0.0"/>
              </bpsim:Quantity>
            </bpsim:ResourceParameters>
            <bpsim:CostParameters xsi:type="bpsim:CostParameters">
              <bpsim:UnitCost xsi:type="bpsim:Parameter">
                <bpsim:FloatingParameter value="0.0"/>
              </bpsim:UnitCost>
            </bpsim:CostParameters>
          </bpsim:ElementParameters>
          <bpsim:ElementParameters xsi:type="bpsim:ElementParameters" elementRef="_6780ACD2-45E8-4B50-B505-BC321258FFAC" id="_IyHsovjgEeqBWrF56ZDtLg">
            <bpsim:TimeParameters xsi:type="bpsim:TimeParameters">
              <bpsim:ProcessingTime xsi:type="bpsim:Parameter">
                <bpsim:NormalDistribution mean="0.0" standardDeviation="0.0"/>
              </bpsim:ProcessingTime>
            </bpsim:TimeParameters>
            <bpsim:ResourceParameters xsi:type="bpsim:ResourceParameters">
              <bpsim:Availability xsi:type="bpsim:Parameter">
                <bpsim:FloatingParameter value="0.0"/>
              </bpsim:Availability>
              <bpsim:Quantity xsi:type="bpsim:Parameter">
                <bpsim:FloatingParameter value="0.0"/>
              </bpsim:Quantity>
            </bpsim:ResourceParameters>
            <bpsim:CostParameters xsi:type="bpsim:CostParameters">
              <bpsim:UnitCost xsi:type="bpsim:Parameter">
                <bpsim:FloatingParameter value="0.0"/>
              </bpsim:UnitCost>
            </bpsim:CostParameters>
          </bpsim:ElementParameters>
        </bpsim:Scenario>
      </bpsim:BPSimData>
    </bpmn2:extensionElements>
    <bpmn2:source>_IyHFgPjgEeqBWrF56ZDtLg</bpmn2:source>
    <bpmn2:target>_IyHFgPjgEeqBWrF56ZDtLg</bpmn2:target>
  </bpmn2:relationship>
</bpmn2:definitions>
