<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="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:tns="http://www.jboss.org/drools" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC-XMI http://www.omg.org/spec/DD/20100524/DI http://www.omg.org/spec/DD/20100524/DI-XMI http://www.omg.org/spec/BPMN/20100524/DI http://www.omg.org/spec/BPMN/20100524/DI-XMI" id="Definition" expressionLanguage="http://www.mvel.org/2.0" targetNamespace="http://www.example.org/MinimalExample" typeLanguage="http://www.java.com/javaTypes">
  <itemDefinition id="_stringItem" structureRef="java.lang.String"/>
  <message id="_message" itemRef="_stringItem"/>
  <interface id="_serviceInterface" name="org.jbpm.examples.exceptions.service.ExceptionService">
    <operation id="_serviceOperation" name="throwException">
      <inMessageRef>_message</inMessageRef>
    </operation>
  </interface>
  <error id="_exception" errorCode="code" structureRef="_exceptionItem"/>
  <itemDefinition id="_exceptionItem" structureRef="org.kie.api.runtime.process.WorkItem"/>
  <message id="_exceptionMessage" itemRef="_exceptionItem"/>
  <interface id="_handlingServiceInterface" name="org.jbpm.examples.exceptions.service.ExceptionService">
    <operation id="_handlingServiceOperation" name="handleException">
      <inMessageRef>_exceptionMessage</inMessageRef>
    </operation>
  </interface>
  <process id="ProcessWithExceptionHandlingError" name="Service Process" isExecutable="true" processType="Private">
    <property id="serviceInputItem" itemSubjectRef="_stringItem"/>
    <property id="exceptionInputItem" itemSubjectRef="_exceptionItem"/>
    <startEvent id="_1" name="Start">
      <outgoing>_1-_2</outgoing>
    </startEvent>
    <serviceTask id="_2" name="Throw Exception" implementation="Other" operationRef="_serviceOperation">
      <incoming>_1-_2</incoming>
      <outgoing>_2-_3</outgoing>
      <ioSpecification id="InputOutputSpecification_1">
        <dataInput id="_2_input" name="Parameter"/>
        <dataOutput id="_2_result" name="Result"/>
        <inputSet id="InputSet_1">
          <dataInputRefs>_2_input</dataInputRefs>
        </inputSet>
        <outputSet id="OutputSet_1">
          <dataOutputRefs>_2_result</dataOutputRefs>
        </outputSet>
      </ioSpecification>
      <dataInputAssociation id="DataInputAssociation_1">
        <sourceRef>serviceInputItem</sourceRef>
        <targetRef>_2_input</targetRef>
      </dataInputAssociation>
      <dataOutputAssociation id="DataOutputAssociation_1">
        <sourceRef>_2_result</sourceRef>
        <targetRef>serviceInputItem</targetRef>
      </dataOutputAssociation>
    </serviceTask>
    <endEvent id="_3" name="End">
      <incoming>_2-_3</incoming>
      <terminateEventDefinition id="TerminateEventDefinition_1"/>
    </endEvent>
    <sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2"/>
    <sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3"/>
    <subProcess id="_X" name="Exception Handler" triggeredByEvent="true">
      <startEvent id="_X-1" name="subStart ">
        <outgoing>_X-1-_X_2</outgoing>
        <dataOutput id="_X-1_Output" name="event"/>
        <dataOutputAssociation id="DataOutputAssociation_2">
          <sourceRef>_X-1_Output</sourceRef>
          <targetRef>exceptionInputItem</targetRef>
        </dataOutputAssociation>
        <outputSet id="OutputSet_2">
          <dataOutputRefs>_X-1_Output</dataOutputRefs>
        </outputSet>
        <errorEventDefinition id="_X-1_ED_1" errorRef="_exception"/>
      </startEvent>
      <endEvent id="_X-3" name="subEnd ">
        <incoming>_X-2-_X_3</incoming>
      </endEvent>
      <sequenceFlow id="_X-1-_X_2" sourceRef="_X-1" targetRef="_X-2"/>
      <serviceTask id="_X-2" name="Handle Exception " implementation="Other" operationRef="_handlingServiceOperation">
        <incoming>_X-1-_X_2</incoming>
        <outgoing>_X-2-_X_3</outgoing>
        <ioSpecification id="InputOutputSpecification_2">
          <dataInput id="_X-2_input" name="Parameter"/>
          <inputSet id="InputSet_2">
            <dataInputRefs>_X-2_input</dataInputRefs>
          </inputSet>
          <outputSet id="OutputSet_3"/>
        </ioSpecification>
        <dataInputAssociation id="DataInputAssociation_2">
          <sourceRef>exceptionInputItem</sourceRef>
          <targetRef>_X-2_input</targetRef>
        </dataInputAssociation>
      </serviceTask>
      <sequenceFlow id="_X-2-_X_3" sourceRef="_X-2" targetRef="_X-3"/>
    </subProcess>
  </process>
  <bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=597.6;height=842.4;imageableWidth=587.6;imageableHeight=832.4;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram">
    <bpmndi:BPMNPlane id="BPMNPlane_BaseElement_1" bpmnElement="ServiceProcess">
      <bpmndi:BPMNShape id="di-_X" bpmnElement="_X" isExpanded="true">
        <dc:Bounds height="115.0" width="280.0" x="330.0" y="30.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_1">
          <dc:Bounds height="115.0" width="280.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="di-_3" bpmnElement="_3">
        <dc:Bounds height="32.0" width="32.0" x="265.0" y="71.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_2">
          <dc:Bounds height="32.0" width="32.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="di-_2" bpmnElement="_2">
        <dc:Bounds height="55.0" width="101.0" x="120.0" y="59.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_3">
          <dc:Bounds height="55.0" width="85.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="di-_1" bpmnElement="_1">
        <dc:Bounds height="32.0" width="32.0" x="28.0" y="71.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_4">
          <dc:Bounds height="32.0" width="32.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="di-_X-3" bpmnElement="_X-3">
        <dc:Bounds height="32.0" width="32.0" x="550.0" y="75.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_5">
          <dc:Bounds height="32.0" width="32.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="di-_X-2" bpmnElement="_X-2">
        <dc:Bounds height="55.0" width="85.0" x="428.0" y="63.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_6">
          <dc:Bounds height="55.0" width="85.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="di-_X-1" bpmnElement="_X-1">
        <dc:Bounds height="32.0" width="32.0" x="345.0" y="75.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_7">
          <dc:Bounds height="32.0" width="32.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="di-_X-2-_X_3" bpmnElement="_X-2-_X_3" sourceElement="di-_X-2" targetElement="di-_X-3">
        <di:waypoint xsi:type="dc:Point" x="513.0" y="90.0"/>
        <di:waypoint xsi:type="dc:Point" x="550.0" y="91.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_8">
          <dc:Bounds height="-1.0" width="-1.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="di-_2-_3" bpmnElement="_2-_3" sourceElement="di-_2" targetElement="di-_3">
        <di:waypoint xsi:type="dc:Point" x="221.0" y="86.0"/>
        <di:waypoint xsi:type="dc:Point" x="265.0" y="87.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_9">
          <dc:Bounds height="-1.0" width="-1.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="di-_1-_2" bpmnElement="_1-_2" sourceElement="di-_1" targetElement="di-_2">
        <di:waypoint xsi:type="dc:Point" x="60.0" y="87.0"/>
        <di:waypoint xsi:type="dc:Point" x="120.0" y="86.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_10">
          <dc:Bounds height="-1.0" width="-1.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="di-_X-1-_X_2" bpmnElement="_X-1-_X_2" sourceElement="di-_X-1" targetElement="di-_X-2">
        <di:waypoint xsi:type="dc:Point" x="377.0" y="91.0"/>
        <di:waypoint xsi:type="dc:Point" x="428.0" y="90.0"/>
        <bpmndi:BPMNLabel id="BPMNLabel_11">
          <dc:Bounds height="-1.0" width="-1.0" x="-1.0" y="-1.0"/>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>