<?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="Material-Bestellung_Definition" targetNamespace="http://bpmn.io/schema/bpmn" exporter="5Minds Studio" exporterVersion="1">
  <bpmn:collaboration id="Collaboration_1cidyxu" name="">
    <bpmn:participant id="Participant_0px403d" name="Material-Bestellung" processRef="Material-Bestellung_Process" />
    <bpmn:participant id="Participant_1l2hdt7" name="Bestell-System" />
    <bpmn:messageFlow id="Flow_1ndgtqe" name="Bestellungs-informationen" sourceRef="Event_1b3tvyc" targetRef="Participant_1l2hdt7" />
  </bpmn:collaboration>
  <bpmn:process id="Material-Bestellung_Process" name="Material-Bestellung" isExecutable="true">
    <bpmn:laneSet>
      <bpmn:lane id="Lane_0djbhv7" name="Einkauf">
        <bpmn:flowNodeRef>Activity_0rdqpib</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_01v213d</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_12h6k04</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Event_1b3tvyc</bpmn:flowNodeRef>
      </bpmn:lane>
      <bpmn:lane id="Lane_1xzf0d3" name="Fachabteilung">
        <bpmn:flowNodeRef>StartEvent_1</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_1v4ol3r</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Gateway_0g4c9dr</bpmn:flowNodeRef>
        <bpmn:flowNodeRef>Activity_1tnkrsp</bpmn:flowNodeRef>
      </bpmn:lane>
    </bpmn:laneSet>
    <bpmn:sequenceFlow id="Flow_0eyxm48" sourceRef="StartEvent_1" targetRef="Activity_1v4ol3r" />
    <bpmn:sequenceFlow id="Flow_1nyy3tg" sourceRef="Activity_1v4ol3r" targetRef="Gateway_0g4c9dr" />
    <bpmn:startEvent id="StartEvent_1" name="Material benötigt">
      <bpmn:outgoing>Flow_0eyxm48</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="Activity_1v4ol3r" name="Bestellung erfassen">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="produkt" label="Produkt" type="string" />
          <camunda:formField id="menge" label="Menge" type="number" customForm="{&#34;step&#34;:1}" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0eyxm48</bpmn:incoming>
      <bpmn:outgoing>Flow_1nyy3tg</bpmn:outgoing>
      <bpmn:dataOutputAssociation id="DataOutputAssociation_1pvem2r">
        <bpmn:targetRef>bestellung</bpmn:targetRef>
      </bpmn:dataOutputAssociation>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_0i290ea" sourceRef="Activity_0rdqpib" targetRef="Gateway_01v213d" />
    <bpmn:sequenceFlow id="Flow_0b7c2y7" name="Nein" sourceRef="Gateway_01v213d" targetRef="Activity_1tnkrsp">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">token.current.genehmigen == false</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_1iujkio" sourceRef="Activity_1tnkrsp" targetRef="Gateway_0g4c9dr" />
    <bpmn:sequenceFlow id="Flow_120yth5" sourceRef="Gateway_0g4c9dr" targetRef="Activity_0rdqpib" />
    <bpmn:exclusiveGateway id="Gateway_0g4c9dr">
      <bpmn:incoming>Flow_1iujkio</bpmn:incoming>
      <bpmn:incoming>Flow_1nyy3tg</bpmn:incoming>
      <bpmn:outgoing>Flow_120yth5</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:userTask id="Activity_0rdqpib" name="Bestellung prüfen">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="produkt" label="Produkt" type="string" defaultValue="${token.current.produkt}" />
          <camunda:formField id="menge" label="Menge" type="number" defaultValue="${token.current.menge}" customForm="{&#34;step&#34;:1}" />
          <camunda:formField id="genehmigen" type="checkbox" customForm="{&#34;entries&#34;:[{&#34;key&#34;:&#34;true&#34;,&#34;value&#34;:&#34;Genehmigen&#34;}]}" />
          <camunda:formField id="hinweis" label="Hinweis" type="string" />
        </camunda:formData>
        <camunda:properties>
          <camunda:property name="engine.runPostScript" value="return {&#10;    ...token.current,&#10;    &#34;genehmigen&#34;: Boolean(token.current.genehmigen)&#10;};" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_120yth5</bpmn:incoming>
      <bpmn:outgoing>Flow_0i290ea</bpmn:outgoing>
      <bpmn:property id="Property_09577t6" name="__targetRef_placeholder" />
      <bpmn:dataInputAssociation id="DataInputAssociation_0j4aqy4">
        <bpmn:sourceRef>bestellung</bpmn:sourceRef>
        <bpmn:targetRef>Property_09577t6</bpmn:targetRef>
      </bpmn:dataInputAssociation>
      <bpmn:dataOutputAssociation id="DataOutputAssociation_01vgpvu">
        <bpmn:targetRef>bestellung</bpmn:targetRef>
      </bpmn:dataOutputAssociation>
    </bpmn:userTask>
    <bpmn:userTask id="Activity_1tnkrsp" name="Bestellung überarbeiten">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="produkt" label="Produkt" type="string" defaultValue="${dataObjects.bestellung.produkt}" />
          <camunda:formField id="menge" label="Menge" type="number" defaultValue="${dataObjects.bestellung.menge}" customForm="{&#34;step&#34;:1}" />
          <camunda:formField id="hinweis" label="Hinweis" type="string" defaultValue="${dataObjects.bestellung.hinweis}" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0b7c2y7</bpmn:incoming>
      <bpmn:outgoing>Flow_1iujkio</bpmn:outgoing>
      <bpmn:property id="Property_0zwvz18" name="__targetRef_placeholder" />
      <bpmn:dataInputAssociation id="DataInputAssociation_1uvus14">
        <bpmn:sourceRef>bestellung</bpmn:sourceRef>
        <bpmn:targetRef>Property_0zwvz18</bpmn:targetRef>
      </bpmn:dataInputAssociation>
      <bpmn:dataOutputAssociation id="DataOutputAssociation_1l1z3b5">
        <bpmn:targetRef>bestellung</bpmn:targetRef>
      </bpmn:dataOutputAssociation>
    </bpmn:userTask>
    <bpmn:exclusiveGateway id="Gateway_01v213d" name="Bestellung korrekt?">
      <bpmn:incoming>Flow_0i290ea</bpmn:incoming>
      <bpmn:outgoing>Flow_0b7c2y7</bpmn:outgoing>
      <bpmn:outgoing>Flow_0yl2ya6</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:dataObjectReference id="bestellung" name="Bestellung" dataObjectRef="DataObject_0os2p4z" />
    <bpmn:dataObject id="DataObject_0os2p4z" />
    <bpmn:endEvent id="Event_12h6k04" name="Bestellung abgeschlossen">
      <bpmn:incoming>Flow_1s336oe</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_0yl2ya6" name="Ja" sourceRef="Gateway_01v213d" targetRef="Event_1b3tvyc">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">token.current.genehmigen == true;</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_1s336oe" sourceRef="Event_1b3tvyc" targetRef="Event_12h6k04" />
    <bpmn:intermediateThrowEvent id="Event_1b3tvyc" name="Bestellung übermitteln">
      <bpmn:extensionElements>
        <camunda:properties>
          <camunda:property name="inputValues" value="dataObjects.bestellung" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0yl2ya6</bpmn:incoming>
      <bpmn:outgoing>Flow_1s336oe</bpmn:outgoing>
      <bpmn:messageEventDefinition id="MessageEventDefinition_1mucpnd" messageRef="Message_jX3rix6A" />
    </bpmn:intermediateThrowEvent>
  </bpmn:process>
  <bpmn:message id="Message_wcCGgNcT" name="bestellung_verbuchen" />
  <bpmn:message id="Message_jX3rix6A" name="bestellung_verbuchen" />
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1cidyxu">
      <bpmndi:BPMNShape id="Participant_0px403d_di" bpmnElement="Participant_0px403d" isHorizontal="true">
        <dc:Bounds x="-55" y="4" width="995" height="686" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1xzf0d3_di" bpmnElement="Lane_1xzf0d3" isHorizontal="true">
        <dc:Bounds x="-25" y="4" width="965" height="346" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_0djbhv7_di" bpmnElement="Lane_0djbhv7" isHorizontal="true">
        <dc:Bounds x="-25" y="350" width="965" height="340" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
        <dc:Bounds x="32" y="152" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="9" y="195" width="82" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1ty6f9e_di" bpmnElement="Activity_1v4ol3r">
        <dc:Bounds x="120" y="130" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_0g4c9dr_di" bpmnElement="Gateway_0g4c9dr" isMarkerVisible="true">
        <dc:Bounds x="285" y="145" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_180v79m_di" bpmnElement="Activity_0rdqpib">
        <dc:Bounds x="380" y="440" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0h7q47u_di" bpmnElement="Activity_1tnkrsp">
        <dc:Bounds x="380" y="130" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_01v213d_di" bpmnElement="Gateway_01v213d" isMarkerVisible="true">
        <dc:Bounds x="535" y="455" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="534" y="515" width="52" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="DataObjectReference_125eezg_di" bpmnElement="bestellung">
        <dc:Bounds x="412" y="265" width="36" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="454" y="283" width="52" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_12h6k04_di" bpmnElement="Event_12h6k04">
        <dc:Bounds x="752" y="462" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="733" y="505" width="74" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_09oky9x_di" bpmnElement="Event_1b3tvyc">
        <dc:Bounds x="652" y="462" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="643" y="505" width="55" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_0eyxm48_di" bpmnElement="Flow_0eyxm48">
        <di:waypoint x="68" y="170" />
        <di:waypoint x="120" y="170" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1nyy3tg_di" bpmnElement="Flow_1nyy3tg">
        <di:waypoint x="220" y="170" />
        <di:waypoint x="285" y="170" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0i290ea_di" bpmnElement="Flow_0i290ea">
        <di:waypoint x="480" y="480" />
        <di:waypoint x="535" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0b7c2y7_di" bpmnElement="Flow_0b7c2y7">
        <di:waypoint x="560" y="455" />
        <di:waypoint x="560" y="170" />
        <di:waypoint x="480" y="170" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="564" y="310" width="23" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1iujkio_di" bpmnElement="Flow_1iujkio">
        <di:waypoint x="380" y="170" />
        <di:waypoint x="335" y="170" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_120yth5_di" bpmnElement="Flow_120yth5">
        <di:waypoint x="310" y="195" />
        <di:waypoint x="310" y="480" />
        <di:waypoint x="380" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0yl2ya6_di" bpmnElement="Flow_0yl2ya6">
        <di:waypoint x="585" y="480" />
        <di:waypoint x="652" y="480" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="591" y="462" width="12" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1s336oe_di" bpmnElement="Flow_1s336oe">
        <di:waypoint x="688" y="480" />
        <di:waypoint x="752" y="480" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Participant_1b2hsde_di" bpmnElement="Participant_1l2hdt7" isHorizontal="true">
        <dc:Bounds x="-55" y="-110" width="995" height="60" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="DataOutputAssociation_1pvem2r_di" bpmnElement="DataOutputAssociation_1pvem2r">
        <di:waypoint x="170" y="210" />
        <di:waypoint x="170" y="290" />
        <di:waypoint x="412" y="290" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DataInputAssociation_0j4aqy4_di" bpmnElement="DataInputAssociation_0j4aqy4">
        <di:waypoint x="440" y="315" />
        <di:waypoint x="440" y="440" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DataOutputAssociation_01vgpvu_di" bpmnElement="DataOutputAssociation_01vgpvu">
        <di:waypoint x="420" y="440" />
        <di:waypoint x="420" y="315" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DataInputAssociation_1uvus14_di" bpmnElement="DataInputAssociation_1uvus14">
        <di:waypoint x="440" y="260" />
        <di:waypoint x="440" y="210" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="DataOutputAssociation_1l1z3b5_di" bpmnElement="DataOutputAssociation_1l1z3b5">
        <di:waypoint x="420" y="210" />
        <di:waypoint x="420" y="265" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1ndgtqe_di" bpmnElement="Flow_1ndgtqe">
        <di:waypoint x="670" y="462" />
        <di:waypoint x="670" y="-50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="686" y="-34" width="67" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
