<?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="Definition_a9082850-9da3-4ea6-bc82-33e88ff52b39" targetNamespace="http://bpmn.io/schema/bpmn" exporter="BPMN Studio" exporterVersion="1">
  <bpmn:collaboration id="Collaboration_1cidyxu" name="">
    <bpmn:participant id="ErrorBoundaryEvent" name="Beispiel: Error Boundary Event" processRef="error_boundary_event" />
  </bpmn:collaboration>
  <bpmn:process id="error_boundary_event" name="Beispiel: Error Boundary Event" isExecutable="true">
    <bpmn:laneSet>
      <bpmn:lane id="Lane_1xzf0d3" name="">
        <bpmn:flowNodeRef>StartEvent_1mox3jl</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_0imkxdw</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_0qd8iu1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ErrorEndEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>EndEvent</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>ErrorEvent</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:sequenceFlow id="Flow_1bq40mo" sourceRef="Activity_0qd8iu1" targetRef="EndEvent" />
    <bpmn:startEvent id="StartEvent_1mox3jl" name="Start Event">
      <bpmn:outgoing>Flow_07fthrz</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_07fthrz" sourceRef="StartEvent_1mox3jl" targetRef="Activity_0imkxdw" />
    <bpmn:sequenceFlow id="Flow_0ps5o2f" sourceRef="Activity_0imkxdw" targetRef="Activity_0qd8iu1" />
    <bpmn:userTask id="Activity_0imkxdw" name="Fehler simulieren?" camunda:formKey="Form Key">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="simulateError" label="Fehler simulieren" type="boolean" defaultValue="" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_07fthrz</bpmn:incoming>
      <bpmn:outgoing>Flow_0ps5o2f</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:scriptTask id="Activity_0qd8iu1" name="Daten verarbeiten">
      <bpmn:documentation>hall</bpmn:documentation>
      <bpmn:incoming>Flow_0ps5o2f</bpmn:incoming>
      <bpmn:outgoing>Flow_1bq40mo</bpmn:outgoing>
      <bpmn:script>const shouldSimulateError = token.current.simulateError;

if (shouldSimulateError)  {
  throw new Error("Something went wrong");
}

return {
  success: 'success'
};</bpmn:script>
    </bpmn:scriptTask>
    <bpmn:endEvent id="ErrorEndEvent" name="">
      <bpmn:incoming>Flow_1o1z52k</bpmn:incoming>
      <bpmn:errorEventDefinition id="ErrorEventDefinition_1suz869" />
    </bpmn:endEvent>
    <bpmn:endEvent id="EndEvent" name="End Event">
      <bpmn:incoming>Flow_1bq40mo</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:boundaryEvent id="ErrorEvent" name="" attachedToRef="Activity_0qd8iu1">
      <bpmn:outgoing>Flow_1o1z52k</bpmn:outgoing>
      <bpmn:errorEventDefinition id="ErrorEventDefinition_0ybfeqn" />
    </bpmn:boundaryEvent>
    <bpmn:sequenceFlow id="Flow_1o1z52k" sourceRef="ErrorEvent" targetRef="ErrorEndEvent" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
      <bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="ErrorBoundaryEvent" isHorizontal="true">
        <dc:Bounds x="-300" y="-35" width="680" height="305" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
        <dc:Bounds x="-270" y="-35" width="650" height="305" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_1mox3jl_di" bpmnElement="StartEvent_1mox3jl">
        <dc:Bounds x="-218" y="30" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="-227" y="71" width="55" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_093102m_di" bpmnElement="Activity_0imkxdw">
        <dc:Bounds x="-120" y="8" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1noy4w0_di" bpmnElement="Activity_0qd8iu1">
        <dc:Bounds x="60" y="8" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_13rdd9y_di" bpmnElement="ErrorEndEvent">
        <dc:Bounds x="262" y="152" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndEvent_0eie6q6_di" bpmnElement="EndEvent">
        <dc:Bounds x="262" y="30" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="255" y="72" width="51" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1829msp_di" bpmnElement="ErrorEvent">
        <dc:Bounds x="113" y="70" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1bq40mo_di" bpmnElement="Flow_1bq40mo">
        <di:waypoint x="160" y="48" />
        <di:waypoint x="262" y="48" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_07fthrz_di" bpmnElement="Flow_07fthrz">
        <di:waypoint x="-182" y="48" />
        <di:waypoint x="-120" y="48" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0ps5o2f_di" bpmnElement="Flow_0ps5o2f">
        <di:waypoint x="-20" y="48" />
        <di:waypoint x="60" y="48" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1o1z52k_di" bpmnElement="Flow_1o1z52k">
        <di:waypoint x="131" y="106" />
        <di:waypoint x="131" y="170" />
        <di:waypoint x="262" y="170" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
