<?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="yearProcess" name="年度检查报告申请" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="inspector" name="检查人员" activiti:assignee="#{inspector}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${inspectorsTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="${inspectorlist}" activiti:elementVariable="inspector"></multiInstanceLoopCharacteristics>
    </userTask>
    <sequenceFlow id="flow1" name="开始" sourceRef="startevent1" targetRef="inspector"></sequenceFlow>
    <userTask id="auditor" name="审核人员" activiti:assignee="#{auditor}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${auditorTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow2" name="通过" sourceRef="inspector" targetRef="auditor">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="approver" name="审批人员" activiti:assignee="#{approver}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${approverTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow3" name="通过" sourceRef="auditor" targetRef="approver">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
    </sequenceFlow>
    <endEvent id="endevent1" name="End">
      <extensionElements>
        <activiti:executionListener event="start" delegateExpression="${endSucessListener}"></activiti:executionListener>
      </extensionElements>
    </endEvent>
    <sequenceFlow id="flow4" name="通过" sourceRef="approver" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
    </sequenceFlow>
    <endEvent id="endevent2" name="End">
      <extensionElements>
        <activiti:executionListener event="start" delegateExpression="${endFaileListener}"></activiti:executionListener>
      </extensionElements>
    </endEvent>
    <sequenceFlow id="flow5" name="不通过" sourceRef="inspector" targetRef="endevent2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow6" name="不通过" sourceRef="approver" targetRef="endevent2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" name="不通过" sourceRef="auditor" targetRef="endevent2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_yearProcess">
    <bpmndi:BPMNPlane bpmnElement="yearProcess" id="BPMNPlane_yearProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="41.0" width="41.0" x="70.0" y="47.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="inspector" id="BPMNShape_inspector">
        <omgdc:Bounds height="55.0" width="105.0" x="190.0" y="40.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="auditor" id="BPMNShape_auditor">
        <omgdc:Bounds height="55.0" width="105.0" x="370.0" y="40.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="approver" id="BPMNShape_approver">
        <omgdc:Bounds height="55.0" width="105.0" x="560.0" y="40.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="739.0" y="50.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
        <omgdc:Bounds height="35.0" width="35.0" x="405.0" y="177.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="111.0" y="67.0"></omgdi:waypoint>
        <omgdi:waypoint x="190.0" y="67.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="113.0" y="47.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="295.0" y="67.0"></omgdi:waypoint>
        <omgdi:waypoint x="370.0" y="67.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="297.0" y="47.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="475.0" y="67.0"></omgdi:waypoint>
        <omgdi:waypoint x="560.0" y="67.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="477.0" y="47.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="665.0" y="67.0"></omgdi:waypoint>
        <omgdi:waypoint x="739.0" y="67.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="673.0" y="47.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="242.0" y="95.0"></omgdi:waypoint>
        <omgdi:waypoint x="242.0" y="194.0"></omgdi:waypoint>
        <omgdi:waypoint x="405.0" y="194.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="247.0" y="136.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="612.0" y="95.0"></omgdi:waypoint>
        <omgdi:waypoint x="612.0" y="194.0"></omgdi:waypoint>
        <omgdi:waypoint x="440.0" y="194.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="617.0" y="136.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="422.0" y="95.0"></omgdi:waypoint>
        <omgdi:waypoint x="422.0" y="177.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="427.0" y="136.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>