<?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="commonProcess" name="普通隐患审批流程" isExecutable="true">
    <startEvent id="startevent" name="开始"></startEvent>
    <userTask id="executor" name="执行人" activiti:assignee="#{executor}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${executorTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="verification" name="验证人" activiti:assignee="#{verification}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${verificationTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endevent" name="结束">
      <extensionElements>
        <activiti:executionListener event="end" delegateExpression="${endSucessListener}"></activiti:executionListener>
      </extensionElements>
    </endEvent>
    <sequenceFlow id="flow3" sourceRef="executor" targetRef="verification">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow4" sourceRef="verification" targetRef="endevent">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow5" name="未达标" sourceRef="verification" targetRef="executor">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 2}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" name="无效" sourceRef="verification" targetRef="recorder">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="recorder" targetRef="executor">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow1" sourceRef="startevent" targetRef="executor"></sequenceFlow>
    <sequenceFlow id="flow6" name="无法执行/逾期" sourceRef="executor" targetRef="recorder">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${submitType == 0}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="recorder" name="记录人" activiti:assignee="#{recorder}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${recorderTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_commonProcess">
    <bpmndi:BPMNPlane bpmnElement="commonProcess" id="BPMNPlane_commonProcess">
      <bpmndi:BPMNShape bpmnElement="startevent" id="BPMNShape_startevent">
        <omgdc:Bounds height="41.0" width="41.0" x="140.0" y="320.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="executor" id="BPMNShape_executor">
        <omgdc:Bounds height="61.0" width="141.0" x="680.0" y="310.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="verification" id="BPMNShape_verification">
        <omgdc:Bounds height="61.0" width="141.0" x="1000.0" y="310.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent" id="BPMNShape_endevent">
        <omgdc:Bounds height="41.0" width="41.0" x="1310.0" y="320.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="recorder" id="BPMNShape_recorder">
        <omgdc:Bounds height="61.0" width="141.0" x="261.0" y="445.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="821.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="1000.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="1141.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="1310.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="1070.0" y="310.0"></omgdi:waypoint>
        <omgdi:waypoint x="1070.0" y="256.0"></omgdi:waypoint>
        <omgdi:waypoint x="750.0" y="256.0"></omgdi:waypoint>
        <omgdi:waypoint x="750.0" y="310.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="48.0" x="880.0" y="231.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="1070.0" y="371.0"></omgdi:waypoint>
        <omgdi:waypoint x="1070.0" y="475.0"></omgdi:waypoint>
        <omgdi:waypoint x="760.0" y="475.0"></omgdi:waypoint>
        <omgdi:waypoint x="450.0" y="475.0"></omgdi:waypoint>
        <omgdi:waypoint x="402.0" y="475.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="32.0" x="750.0" y="479.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="331.0" y="445.0"></omgdi:waypoint>
        <omgdi:waypoint x="331.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="680.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="181.0" y="340.0"></omgdi:waypoint>
        <omgdi:waypoint x="680.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="750.0" y="371.0"></omgdi:waypoint>
        <omgdi:waypoint x="750.0" y="408.0"></omgdi:waypoint>
        <omgdi:waypoint x="586.0" y="408.0"></omgdi:waypoint>
        <omgdi:waypoint x="450.0" y="408.0"></omgdi:waypoint>
        <omgdi:waypoint x="331.0" y="445.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="18.0" width="100.0" x="550.0" y="409.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>