<?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/test">
  <process id="accidentProcess" name="事件审批流程" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="confirm" name="确认" activiti:assignee="${confirm}">
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${confirmlist}" activiti:elementVariable="confirm"></multiInstanceLoopCharacteristics>
    </userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="confirm"></sequenceFlow>
    <userTask id="recorder" name="记录人" activiti:assignee="#{recorder}"></userTask>
    <sequenceFlow id="flow2" sourceRef="confirm" targetRef="recorder">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="tManagerConfirm" name="装置经理确认" activiti:assignee="#{manager}"></userTask>
    <sequenceFlow id="flow3" name="3&amp;4级" sourceRef="recorder" targetRef="tManagerConfirm">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1 && accidentLevel == 2}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="lManagerConfirm" name="装置经理确认" activiti:assignee="#{manager}"></userTask>
    <sequenceFlow id="flow4" name="1&amp;2级" sourceRef="recorder" targetRef="lManagerConfirm">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1 && accidentLevel == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="tDirectorConfirm" name="装置总监确认" activiti:assignee="#{director}"></userTask>
    <sequenceFlow id="flow5" sourceRef="tManagerConfirm" targetRef="tDirectorConfirm">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="ctmManagerConfirm" name="CTS经理确认" activiti:assignee="#{ctsManager}"></userTask>
    <sequenceFlow id="flow6" sourceRef="tDirectorConfirm" targetRef="ctmManagerConfirm">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="lManagerConfirm" targetRef="ctmManagerConfirm">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="executor" name="执行人" activiti:assignee="#{executor}"></userTask>
    <sequenceFlow id="flow8" sourceRef="ctmManagerConfirm" targetRef="executor">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="verification" name="验证人" activiti:assignee="#{verification}"></userTask>
    <sequenceFlow id="flow9" sourceRef="executor" targetRef="verification">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="managerApprove" name="装置经理批准" activiti:assignee="#{manager}"></userTask>
    <sequenceFlow id="flow10" sourceRef="verification" targetRef="managerApprove">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="ctmDirectorApprove" name="CTS总监批准" activiti:assignee="#{ctsDirector}"></userTask>
    <sequenceFlow id="flow11" name="3&amp;4级" sourceRef="managerApprove" targetRef="ctmDirectorApprove">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1 && accidentLevel == 2}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="ctmManagerApprove" name="CTS经理批准" activiti:assignee="#{ctsManager}"></userTask>
    <sequenceFlow id="flow12" name="1&amp;2级" sourceRef="managerApprove" targetRef="ctmManagerApprove">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1 && accidentLevel == 1}]]></conditionExpression>
    </sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow13" sourceRef="ctmDirectorApprove" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow14" sourceRef="ctmManagerApprove" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow15" name="无法执行" sourceRef="executor" targetRef="recorder">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow16" name="未达标" sourceRef="verification" targetRef="executor">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 2}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow17" name="无效" sourceRef="verification" targetRef="recorder">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 0}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_accidentProcess">
    <bpmndi:BPMNPlane bpmnElement="accidentProcess" id="BPMNPlane_accidentProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="41.0" width="41.0" x="30.0" y="320.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="confirm" id="BPMNShape_confirm">
        <omgdc:Bounds height="55.0" width="105.0" x="170.0" y="313.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="recorder" id="BPMNShape_recorder">
        <omgdc:Bounds height="55.0" width="105.0" x="360.0" y="313.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="tManagerConfirm" id="BPMNShape_tManagerConfirm">
        <omgdc:Bounds height="55.0" width="105.0" x="510.0" y="230.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="lManagerConfirm" id="BPMNShape_lManagerConfirm">
        <omgdc:Bounds height="55.0" width="105.0" x="596.0" y="400.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="tDirectorConfirm" id="BPMNShape_tDirectorConfirm">
        <omgdc:Bounds height="55.0" width="105.0" x="700.0" y="230.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ctmManagerConfirm" id="BPMNShape_ctmManagerConfirm">
        <omgdc:Bounds height="55.0" width="105.0" x="840.0" y="313.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="executor" id="BPMNShape_executor">
        <omgdc:Bounds height="55.0" width="105.0" x="1030.0" y="313.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="verification" id="BPMNShape_verification">
        <omgdc:Bounds height="55.0" width="105.0" x="1210.0" y="313.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="managerApprove" id="BPMNShape_managerApprove">
        <omgdc:Bounds height="55.0" width="105.0" x="1210.0" y="570.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ctmDirectorApprove" id="BPMNShape_ctmDirectorApprove">
        <omgdc:Bounds height="55.0" width="105.0" x="1000.0" y="490.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ctmManagerApprove" id="BPMNShape_ctmManagerApprove">
        <omgdc:Bounds height="55.0" width="105.0" x="1000.0" y="650.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="42.0" width="41.0" x="820.0" y="577.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="71.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="170.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="275.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="360.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="412.0" y="313.0"></omgdi:waypoint>
        <omgdi:waypoint x="752.0" y="285.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="389.0" y="286.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="412.0" y="368.0"></omgdi:waypoint>
        <omgdi:waypoint x="648.0" y="400.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="437.0" y="399.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="805.0" y="257.0"></omgdi:waypoint>
        <omgdi:waypoint x="805.0" y="257.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="752.0" y="285.0"></omgdi:waypoint>
        <omgdi:waypoint x="892.0" y="313.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="648.0" y="400.0"></omgdi:waypoint>
        <omgdi:waypoint x="892.0" y="368.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="945.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="1030.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="1135.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="1210.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="1315.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="1391.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="1391.0" y="473.0"></omgdi:waypoint>
        <omgdi:waypoint x="1391.0" y="597.0"></omgdi:waypoint>
        <omgdi:waypoint x="1052.0" y="650.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="1052.0" y="650.0"></omgdi:waypoint>
        <omgdi:waypoint x="1262.0" y="517.0"></omgdi:waypoint>
        <omgdi:waypoint x="1052.0" y="650.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="990.0" y="571.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="1105.0" y="677.0"></omgdi:waypoint>
        <omgdi:waypoint x="1262.0" y="677.0"></omgdi:waypoint>
        <omgdi:waypoint x="1105.0" y="677.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="1043.0" y="738.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
        <omgdi:waypoint x="1052.0" y="650.0"></omgdi:waypoint>
        <omgdi:waypoint x="840.0" y="517.0"></omgdi:waypoint>
        <omgdi:waypoint x="840.0" y="577.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
        <omgdi:waypoint x="1000.0" y="677.0"></omgdi:waypoint>
        <omgdi:waypoint x="840.0" y="677.0"></omgdi:waypoint>
        <omgdi:waypoint x="840.0" y="619.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
        <omgdi:waypoint x="1082.0" y="313.0"></omgdi:waypoint>
        <omgdi:waypoint x="1082.0" y="176.0"></omgdi:waypoint>
        <omgdi:waypoint x="746.0" y="176.0"></omgdi:waypoint>
        <omgdi:waypoint x="412.0" y="176.0"></omgdi:waypoint>
        <omgdi:waypoint x="412.0" y="313.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="721.0" y="151.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
        <omgdi:waypoint x="1262.0" y="368.0"></omgdi:waypoint>
        <omgdi:waypoint x="1262.0" y="420.0"></omgdi:waypoint>
        <omgdi:waypoint x="1174.0" y="420.0"></omgdi:waypoint>
        <omgdi:waypoint x="1082.0" y="420.0"></omgdi:waypoint>
        <omgdi:waypoint x="1082.0" y="368.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="1150.0" y="424.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
        <omgdi:waypoint x="1262.0" y="313.0"></omgdi:waypoint>
        <omgdi:waypoint x="1262.0" y="87.0"></omgdi:waypoint>
        <omgdi:waypoint x="833.0" y="87.0"></omgdi:waypoint>
        <omgdi:waypoint x="412.0" y="87.0"></omgdi:waypoint>
        <omgdi:waypoint x="412.0" y="313.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="830.0" y="61.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>