<?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="gather-use" name="采集审批业务流程" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="startTask" name="采集申请" activiti:assignee="${processCreator}">
      <extensionElements>
        <activiti:taskListener event="create" expression="${gatherCreateListener.createStartTask(task)}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="dgoTask" name="数据采集室科长审批">
      <extensionElements>
        <activiti:taskListener event="create" expression="${gatherCreateListener.createDgoTask(task)}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="dmacTask" name="数据管理与分析中心主任审批">
      <extensionElements>
        <activiti:taskListener event="create" expression="${gatherCreateListener.createDmacTask(task)}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="startTask"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow4" name="通过" sourceRef="exclusivegateway1" targetRef="dmacTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==1}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow5" sourceRef="dgoTask" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow6" sourceRef="dmacTask" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow7" name="不通过" sourceRef="exclusivegateway2" targetRef="dgoTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow8" name="通过" sourceRef="exclusivegateway2" targetRef="oaTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==1}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow9" sourceRef="oaTask" targetRef="exclusivegateway3"></sequenceFlow>
    <sequenceFlow id="flow10" name="不通过" sourceRef="exclusivegateway3" targetRef="dmacTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow11" name="通过" sourceRef="exclusivegateway3" targetRef="endTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow12" sourceRef="endTask" targetRef="endevent1"></sequenceFlow>
    <serviceTask id="oaTask" name="接入OA系统进行保管部、文保院和分管副馆长、馆长审批" activiti:expression="${gatherOAService.execute(task)}"></serviceTask>
    <userTask id="daoTask" name="数据应用室科长审批" activiti:skipExpression="${processCreatorPosition=='科长'}">
      <extensionElements>
        <activiti:taskListener event="create" expression="${gatherCreateListener.createDaoTask(task)}"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow22" name="不通过" sourceRef="exclusivegateway1" targetRef="daoTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow23" sourceRef="startTask" targetRef="daoTask"></sequenceFlow>
    <sequenceFlow id="flow25" name="不通过" sourceRef="exclusivegateway4" targetRef="startTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==0}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow26" name="通过" sourceRef="exclusivegateway4" targetRef="dgoTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${taskFlowType==1}]]></conditionExpression>
    </sequenceFlow>
    <serviceTask id="endTask" name="归档" activiti:expression="${gatherArchiveService.execute(task)}"></serviceTask>
    <exclusiveGateway id="exclusivegateway4" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow27" sourceRef="daoTask" targetRef="exclusivegateway4"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_gather-use">
    <bpmndi:BPMNPlane bpmnElement="gather-use" id="BPMNPlane_gather-use">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="10.0" y="260.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startTask" id="BPMNShape_startTask">
        <omgdc:Bounds height="71.0" width="105.0" x="90.0" y="242.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="dgoTask" id="BPMNShape_dgoTask">
        <omgdc:Bounds height="71.0" width="105.0" x="407.0" y="242.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="dmacTask" id="BPMNShape_dmacTask">
        <omgdc:Bounds height="71.0" width="121.0" x="577.0" y="242.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="1160.0" y="260.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="439.0" y="148.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="617.0" y="360.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">
        <omgdc:Bounds height="40.0" width="40.0" x="843.0" y="148.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="oaTask" id="BPMNShape_oaTask">
        <omgdc:Bounds height="71.0" width="221.0" x="753.0" y="242.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="daoTask" id="BPMNShape_daoTask">
        <omgdc:Bounds height="71.0" width="105.0" x="247.0" y="242.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endTask" id="BPMNShape_endTask">
        <omgdc:Bounds height="71.0" width="105.0" x="1000.0" y="242.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway4" id="BPMNShape_exclusivegateway4">
        <omgdc:Bounds height="40.0" width="40.0" x="279.0" y="360.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="45.0" y="277.0"></omgdi:waypoint>
        <omgdi:waypoint x="90.0" y="277.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="479.0" y="168.0"></omgdi:waypoint>
        <omgdi:waypoint x="637.0" y="167.0"></omgdi:waypoint>
        <omgdi:waypoint x="637.0" y="242.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="508.0" y="149.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="459.0" y="242.0"></omgdi:waypoint>
        <omgdi:waypoint x="459.0" y="188.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="637.0" y="313.0"></omgdi:waypoint>
        <omgdi:waypoint x="637.0" y="360.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="617.0" y="380.0"></omgdi:waypoint>
        <omgdi:waypoint x="459.0" y="379.0"></omgdi:waypoint>
        <omgdi:waypoint x="459.0" y="313.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="518.0" y="386.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="657.0" y="380.0"></omgdi:waypoint>
        <omgdi:waypoint x="863.0" y="379.0"></omgdi:waypoint>
        <omgdi:waypoint x="863.0" y="313.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="705.0" y="386.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="863.0" y="242.0"></omgdi:waypoint>
        <omgdi:waypoint x="863.0" y="188.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="843.0" y="168.0"></omgdi:waypoint>
        <omgdi:waypoint x="637.0" y="168.0"></omgdi:waypoint>
        <omgdi:waypoint x="637.0" y="242.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="757.0" y="147.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="883.0" y="168.0"></omgdi:waypoint>
        <omgdi:waypoint x="1052.0" y="167.0"></omgdi:waypoint>
        <omgdi:waypoint x="1052.0" y="242.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="925.0" y="148.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="1105.0" y="277.0"></omgdi:waypoint>
        <omgdi:waypoint x="1160.0" y="277.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow22" id="BPMNEdge_flow22">
        <omgdi:waypoint x="439.0" y="168.0"></omgdi:waypoint>
        <omgdi:waypoint x="299.0" y="167.0"></omgdi:waypoint>
        <omgdi:waypoint x="299.0" y="242.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="361.0" y="149.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow23" id="BPMNEdge_flow23">
        <omgdi:waypoint x="195.0" y="277.0"></omgdi:waypoint>
        <omgdi:waypoint x="247.0" y="277.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow25" id="BPMNEdge_flow25">
        <omgdi:waypoint x="279.0" y="380.0"></omgdi:waypoint>
        <omgdi:waypoint x="142.0" y="379.0"></omgdi:waypoint>
        <omgdi:waypoint x="142.0" y="313.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="48.0" x="181.0" y="386.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow26" id="BPMNEdge_flow26">
        <omgdi:waypoint x="319.0" y="380.0"></omgdi:waypoint>
        <omgdi:waypoint x="459.0" y="380.0"></omgdi:waypoint>
        <omgdi:waypoint x="459.0" y="313.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="16.0" width="32.0" x="350.0" y="385.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow27" id="BPMNEdge_flow27">
        <omgdi:waypoint x="299.0" y="313.0"></omgdi:waypoint>
        <omgdi:waypoint x="299.0" y="360.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>