<?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="monthProcess" name="月度检查" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="mechanical" name="机械维修" activiti:assignee="#{mechanical}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${mechanicalTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" name="开始" sourceRef="startevent1" targetRef="mechanical"></sequenceFlow>
    <userTask id="electric" name="电仪维修" activiti:assignee="#{electric}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${electricTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow2" name="通过" sourceRef="mechanical" targetRef="electric">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
    </sequenceFlow>
    <userTask id="craft" name="工艺部门" activiti:assignee="#{craft}">
      <extensionElements>
        <activiti:taskListener event="create" delegateExpression="${craftTaskCreateListener}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow3" name="通过" sourceRef="electric" targetRef="craft">
      <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="craft" 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="mechanical" targetRef="endevent2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow6" name="不通过" sourceRef="electric" targetRef="endevent2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow7" name="不通过" sourceRef="craft" targetRef="endevent2">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
    </sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_monthProcess">
    <bpmndi:BPMNPlane bpmnElement="monthProcess" id="BPMNPlane_monthProcess">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="41.0" width="41.0" x="100.0" y="37.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mechanical" id="BPMNShape_mechanical">
        <omgdc:Bounds height="55.0" width="105.0" x="220.0" y="30.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="electric" id="BPMNShape_electric">
        <omgdc:Bounds height="55.0" width="105.0" x="400.0" y="30.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="craft" id="BPMNShape_craft">
        <omgdc:Bounds height="55.0" width="105.0" x="589.0" y="30.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="780.0" y="40.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
        <omgdc:Bounds height="35.0" width="35.0" x="435.0" y="177.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="141.0" y="57.0"></omgdi:waypoint>
        <omgdi:waypoint x="220.0" y="57.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="149.0" y="30.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="325.0" y="57.0"></omgdi:waypoint>
        <omgdi:waypoint x="400.0" y="57.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="335.0" y="30.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="505.0" y="57.0"></omgdi:waypoint>
        <omgdi:waypoint x="589.0" y="57.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="519.0" y="30.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="694.0" y="57.0"></omgdi:waypoint>
        <omgdi:waypoint x="780.0" y="57.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="714.0" y="30.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="272.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="272.0" y="192.0"></omgdi:waypoint>
        <omgdi:waypoint x="435.0" y="194.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="275.0" y="136.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="452.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="452.0" y="177.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="455.0" y="136.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="641.0" y="85.0"></omgdi:waypoint>
        <omgdi:waypoint x="641.0" y="195.0"></omgdi:waypoint>
        <omgdi:waypoint x="470.0" y="194.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="644.0" y="136.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>