<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/processdef">
  <process id="workOrder" name="workOrder" isExecutable="true">
    <startEvent id="start-workorder"/>
    <userTask id="d1" name="创建工单" activiti:assignee="${startUser}">
      <extensionElements>
        <activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
      </extensionElements>
    </userTask>
    <userTask id="d2" name="处理工单">
      <extensionElements>
        <activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
      </extensionElements>
    </userTask>
    <userTask id="d3" name="验收工单">
      <extensionElements>
        <activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
      </extensionElements>
    </userTask>
    <userTask id="d4" name="评价工单">
      <extensionElements>
        <activiti:taskListener class="com.ho.flow.listener.Node1Listener" event="create"/>
      </extensionElements>
    </userTask>
    <endEvent id="end-workorder"/>
    <endEvent id="cancel-workorder"/>
    <sequenceFlow id="sid-4ac0805f-3d90-4a46-a592-7de4ece7b511" sourceRef="start-workorder" targetRef="d1"/>
    <sequenceFlow id="sid-f872c33d-1b0a-4c48-85bf-8d9c1e685c48" sourceRef="d1" targetRef="d2">
      <conditionExpression>${complete==0}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-563b14ed-13a1-4e1b-95a0-15a0b15fb640" sourceRef="d2" targetRef="d1">
      <conditionExpression>${complete==1}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-e0e874a3-d5bd-4c78-8867-00b9c06d9cd0" sourceRef="d2" targetRef="d3">
      <conditionExpression>${complete==0}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-f018f67f-56ab-4bb1-9351-e2a2d7a41448" sourceRef="d3" targetRef="d4">
      <conditionExpression>${complete==0}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-e9371c33-3692-4e1e-9873-b1a0cbd0c667" sourceRef="d3" targetRef="d2">
      <conditionExpression>${complete==2}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-48ec5ec3-e4d7-4a2a-8525-350a39bc8cda" sourceRef="d3" targetRef="d1">
      <conditionExpression>${complete==1}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-eb2b92f2-acf4-477a-a8b4-eb0e3e4f9e17" sourceRef="d4" targetRef="d3">
      <conditionExpression>${complete==3}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-b38c6c3a-2946-40a2-a193-721004a9817e" sourceRef="d4" targetRef="d2">
      <conditionExpression>${complete==2}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-582462db-74d0-4921-b402-6505e6d283f9" sourceRef="d4" targetRef="d1">
      <conditionExpression>${complete==1}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-026ed14c-8337-4f60-b3e5-551431e68b42" sourceRef="d1" targetRef="cancel-workorder">
      <conditionExpression>${complete==1}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-38cc02a8-1be7-4b8c-ae0b-5983beaf4c57" sourceRef="d4" targetRef="end-workorder">
      <conditionExpression>${complete==0}</conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_workOrder">
    <bpmndi:BPMNPlane bpmnElement="workOrder" id="BPMNPlane_workOrder">
      <bpmndi:BPMNShape id="shape-b4955b78-cfe4-458c-b9df-94c51c85aa44" bpmnElement="start-workorder">
        <omgdc:Bounds x="-320.0" y="-35.0" width="30.0" height="30.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape-bc8ee721-fcbc-4a95-9ccc-814cbe9fd54b" bpmnElement="d1">
        <omgdc:Bounds x="-245.0" y="-40.0" width="45.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="sid-9381f63a-4494-4fb0-aaa7-45e951302edd" bpmnElement="d2">
        <omgdc:Bounds x="-161.5" y="-40.0" width="45.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="sid-e3da6fc3-5e97-4c25-a449-ea78193b9010" bpmnElement="d3">
        <omgdc:Bounds x="-66.5" y="-40.0" width="45.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="sid-d7653211-42a4-43dc-b62a-9915c2afbe49" bpmnElement="d4">
        <omgdc:Bounds x="30.0" y="-40.0" width="45.0" height="40.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape-31c1e224-2cde-406b-8e1c-4fff04edac65" bpmnElement="end-workorder">
        <omgdc:Bounds x="120.0" y="-35.0" width="30.0" height="30.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="shape-2f26b9b5-72e6-4d42-9c2b-3911a52a3f91" bpmnElement="cancel-workorder">
        <omgdc:Bounds x="-237.5" y="-135.0" width="30.0" height="30.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="edge-f92c494f-4201-4ede-8665-0d69d5c025ce" bpmnElement="sid-4ac0805f-3d90-4a46-a592-7de4ece7b511">
        <omgdi:waypoint x="-290.0" y="-20.0"/>
        <omgdi:waypoint x="-245.0" y="-20.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-0a3098ad-5fe1-403b-86da-f1a8bc61faec" bpmnElement="sid-f872c33d-1b0a-4c48-85bf-8d9c1e685c48">
        <omgdi:waypoint x="-200.0" y="-20.0"/>
        <omgdi:waypoint x="-161.5" y="-20.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-27e356c2-4f66-4d8f-b295-1196f7195f00" bpmnElement="sid-563b14ed-13a1-4e1b-95a0-15a0b15fb640">
        <omgdi:waypoint x="-161.5" y="-30.0"/>
        <omgdi:waypoint x="-200.0" y="-30.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-f28ed170-361d-4011-aa81-6acefc623953" bpmnElement="sid-e0e874a3-d5bd-4c78-8867-00b9c06d9cd0">
        <omgdi:waypoint x="-116.5" y="-20.0"/>
        <omgdi:waypoint x="-66.5" y="-20.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-215421d9-530c-4480-be86-161227ec5d41" bpmnElement="sid-f018f67f-56ab-4bb1-9351-e2a2d7a41448">
        <omgdi:waypoint x="-21.5" y="-20.0"/>
        <omgdi:waypoint x="30.0" y="-20.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-ca594598-b24b-4541-98a3-bf9cad24d202" bpmnElement="sid-e9371c33-3692-4e1e-9873-b1a0cbd0c667">
        <omgdi:waypoint x="-66.5" y="-30.0"/>
        <omgdi:waypoint x="-116.5" y="-30.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-c8e8287f-0e6c-4777-8ed4-000560bb562c" bpmnElement="sid-48ec5ec3-e4d7-4a2a-8525-350a39bc8cda">
        <omgdi:waypoint x="-66.5" y="-10.0"/>
        <omgdi:waypoint x="-139.0" y="45.0"/>
        <omgdi:waypoint x="-200.0" y="-10.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-efa88a48-83fb-47e6-b5d9-c041a03b4dfb" bpmnElement="sid-eb2b92f2-acf4-477a-a8b4-eb0e3e4f9e17">
        <omgdi:waypoint x="30.0" y="-30.0"/>
        <omgdi:waypoint x="-21.5" y="-30.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-daa2d750-c2ba-4595-9618-695e552d5368" bpmnElement="sid-b38c6c3a-2946-40a2-a193-721004a9817e">
        <omgdi:waypoint x="30.0" y="-10.0"/>
        <omgdi:waypoint x="-44.0" y="45.0"/>
        <omgdi:waypoint x="-116.5" y="-10.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-41421199-87c7-4cfe-9a99-36fb79a21e26" bpmnElement="sid-582462db-74d0-4921-b402-6505e6d283f9">
        <omgdi:waypoint x="41.25" y="-40.0"/>
        <omgdi:waypoint x="-100.0" y="-120.0"/>
        <omgdi:waypoint x="-211.25" y="-40.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-ae6d5ae6-af51-45ab-bdbf-d6703fe23bb8" bpmnElement="sid-026ed14c-8337-4f60-b3e5-551431e68b42">
        <omgdi:waypoint x="-222.5" y="-40.0"/>
        <omgdi:waypoint x="-222.5" y="-105.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="edge-915bf0b5-e5de-42ee-aec8-2740111658f6" bpmnElement="sid-38cc02a8-1be7-4b8c-ae0b-5983beaf4c57">
        <omgdi:waypoint x="75.0" y="-20.0"/>
        <omgdi:waypoint x="120.0" y="-20.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
