<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" xmlns:color="http://www.omg.org/spec/BPMN/non-normative/color/1.0" id="Definitions_customer_complaint" targetNamespace="http://bpmn.io/schema/bpmn">
  <bpmn:collaboration id="Collaboration_customer_complaint">
    <bpmn:participant id="Participant_customer_complaint" name="Customer Complaint" processRef="Process_customer_complaint" />
  </bpmn:collaboration>
  <bpmn:process id="Process_customer_complaint" name="Customer Complaint" isExecutable="true">
    <bpmn:laneSet id="LaneSet_customer_complaint">
      <bpmn:lane id="Lane_1" name="Customer Service"><bpmn:flowNodeRef>Start</bpmn:flowNodeRef><bpmn:flowNodeRef>Record</bpmn:flowNodeRef><bpmn:flowNodeRef>Offer</bpmn:flowNodeRef><bpmn:flowNodeRef>Close</bpmn:flowNodeRef><bpmn:flowNodeRef>End</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_2" name="Quality Management"><bpmn:flowNodeRef>Measure</bpmn:flowNodeRef></bpmn:lane>
      <bpmn:lane id="Lane_3" name="Specialist Department"><bpmn:flowNodeRef>Investigate</bpmn:flowNodeRef><bpmn:flowNodeRef>Justified</bpmn:flowNodeRef><bpmn:flowNodeRef>Reason</bpmn:flowNodeRef><bpmn:flowNodeRef>EndRejected</bpmn:flowNodeRef></bpmn:lane>
    </bpmn:laneSet>
    <bpmn:startEvent id="Start" name="Complaint received"><bpmn:outgoing>Flow_1</bpmn:outgoing></bpmn:startEvent>
    <bpmn:userTask id="Record" name="Record the complaint"><bpmn:incoming>Flow_1</bpmn:incoming><bpmn:outgoing>Flow_2</bpmn:outgoing></bpmn:userTask>
    <bpmn:userTask id="Investigate" name="Investigate the cause"><bpmn:incoming>Flow_2</bpmn:incoming><bpmn:outgoing>Flow_3</bpmn:outgoing></bpmn:userTask>
    <bpmn:exclusiveGateway id="Justified" name="Complaint justified?" default="Flow_5"><bpmn:incoming>Flow_3</bpmn:incoming><bpmn:outgoing>Flow_4</bpmn:outgoing><bpmn:outgoing>Flow_5</bpmn:outgoing></bpmn:exclusiveGateway>
    <bpmn:userTask id="Reason" name="State the reason for the rejection"><bpmn:incoming>Flow_4</bpmn:incoming><bpmn:outgoing>Flow_6</bpmn:outgoing></bpmn:userTask>
    <bpmn:endEvent id="EndRejected" name="Complaint rejected"><bpmn:incoming>Flow_6</bpmn:incoming></bpmn:endEvent>
    <bpmn:userTask id="Offer" name="Offer a solution to the customer"><bpmn:incoming>Flow_5</bpmn:incoming><bpmn:outgoing>Flow_7</bpmn:outgoing></bpmn:userTask>
    <bpmn:userTask id="Measure" name="Define a measure against the cause"><bpmn:incoming>Flow_7</bpmn:incoming><bpmn:outgoing>Flow_8</bpmn:outgoing></bpmn:userTask>
    <bpmn:userTask id="Close" name="Close the complaint"><bpmn:incoming>Flow_8</bpmn:incoming><bpmn:outgoing>Flow_9</bpmn:outgoing></bpmn:userTask>
    <bpmn:endEvent id="End" name="Complaint resolved"><bpmn:incoming>Flow_9</bpmn:incoming></bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_1" sourceRef="Start" targetRef="Record" />
    <bpmn:sequenceFlow id="Flow_2" sourceRef="Record" targetRef="Investigate" />
    <bpmn:sequenceFlow id="Flow_3" sourceRef="Investigate" targetRef="Justified" />
    <bpmn:sequenceFlow id="Flow_4" name="No" sourceRef="Justified" targetRef="Reason"><bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${cur.fields.status.name == 'Rejected'}</bpmn:conditionExpression></bpmn:sequenceFlow>
    <bpmn:sequenceFlow id="Flow_5" name="Yes" sourceRef="Justified" targetRef="Offer" />
    <bpmn:sequenceFlow id="Flow_6" sourceRef="Reason" targetRef="EndRejected" />
    <bpmn:sequenceFlow id="Flow_7" sourceRef="Offer" targetRef="Measure" />
    <bpmn:sequenceFlow id="Flow_8" sourceRef="Measure" targetRef="Close" />
    <bpmn:sequenceFlow id="Flow_9" sourceRef="Close" targetRef="End" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="Diagram_customer_complaint">
    <bpmndi:BPMNPlane id="Plane_customer_complaint" bpmnElement="Collaboration_customer_complaint">
      <bpmndi:BPMNShape id="Participant_customer_complaint_di" bpmnElement="Participant_customer_complaint" isHorizontal="true"><dc:Bounds x="160" y="80" width="1740" height="420" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_1_di" bpmnElement="Lane_1" isHorizontal="true"><dc:Bounds x="190" y="80" width="1710" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_2_di" bpmnElement="Lane_2" isHorizontal="true"><dc:Bounds x="190" y="220" width="1710" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Lane_3_di" bpmnElement="Lane_3" isHorizontal="true"><dc:Bounds x="190" y="360" width="1710" height="140" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Start_di" bpmnElement="Start"><dc:Bounds x="282" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="250" y="174" width="100" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Record_di" bpmnElement="Record" bioc:stroke="#1e88e5" bioc:fill="#bbdefb" color:background-color="#bbdefb" color:border-color="#1e88e5"><dc:Bounds x="425" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Investigate_di" bpmnElement="Investigate" bioc:stroke="#fb8c00" bioc:fill="#ffe0b2" color:background-color="#ffe0b2" color:border-color="#fb8c00"><dc:Bounds x="625" y="390" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Justified_di" bpmnElement="Justified" isMarkerVisible="true"><dc:Bounds x="875" y="405" width="50" height="50" /><bpmndi:BPMNLabel><dc:Bounds x="797" y="373" width="90" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Reason_di" bpmnElement="Reason" bioc:stroke="#fb8c00" bioc:fill="#ffe0b2" color:background-color="#ffe0b2" color:border-color="#fb8c00"><dc:Bounds x="1025" y="390" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="EndRejected_di" bpmnElement="EndRejected"><dc:Bounds x="1282" y="412" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1250" y="454" width="100" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Offer_di" bpmnElement="Offer" bioc:stroke="#1e88e5" bioc:fill="#bbdefb" color:background-color="#bbdefb" color:border-color="#1e88e5"><dc:Bounds x="1025" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Measure_di" bpmnElement="Measure" bioc:stroke="#43a047" bioc:fill="#c8e6c9" color:background-color="#c8e6c9" color:border-color="#43a047"><dc:Bounds x="1225" y="250" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Close_di" bpmnElement="Close" bioc:stroke="#1e88e5" bioc:fill="#bbdefb" color:background-color="#bbdefb" color:border-color="#1e88e5"><dc:Bounds x="1425" y="110" width="150" height="80" /></bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_di" bpmnElement="End"><dc:Bounds x="1682" y="132" width="36" height="36" /><bpmndi:BPMNLabel><dc:Bounds x="1650" y="174" width="100" height="27" /></bpmndi:BPMNLabel></bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1"><di:waypoint x="318" y="150" /><di:waypoint x="425" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2"><di:waypoint x="575" y="150" /><di:waypoint x="600" y="150" /><di:waypoint x="600" y="430" /><di:waypoint x="625" y="430" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3"><di:waypoint x="775" y="430" /><di:waypoint x="875" y="430" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4"><di:waypoint x="925" y="430" /><di:waypoint x="1025" y="430" /><bpmndi:BPMNLabel><dc:Bounds x="933" y="410" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5"><di:waypoint x="900" y="405" /><di:waypoint x="900" y="150" /><di:waypoint x="1025" y="150" /><bpmndi:BPMNLabel><dc:Bounds x="912" y="130" width="30" height="14" /></bpmndi:BPMNLabel></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_6_di" bpmnElement="Flow_6"><di:waypoint x="1175" y="430" /><di:waypoint x="1282" y="430" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_7_di" bpmnElement="Flow_7"><di:waypoint x="1175" y="150" /><di:waypoint x="1200" y="150" /><di:waypoint x="1200" y="290" /><di:waypoint x="1225" y="290" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_8_di" bpmnElement="Flow_8"><di:waypoint x="1375" y="290" /><di:waypoint x="1400" y="290" /><di:waypoint x="1400" y="150" /><di:waypoint x="1425" y="150" /></bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_9_di" bpmnElement="Flow_9"><di:waypoint x="1575" y="150" /><di:waypoint x="1682" y="150" /></bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>
