1. 说明
在会签功能学习1基础上的升级。
2. 流程实现
场景:有多个项目经理进行审批,全部通过才能结束,全部不同意就驳回重新申请。
流程图:
Bpmn文件
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" 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" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1596608849637" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="leave" isClosed="false" isExecutable="true" processType="None">
<startEvent id="_2" name="开始"/>
<userTask activiti:assignee="${inputUser}" activiti:exclusive="true" id="_3" name="填写请假单">
<extensionElements>
<activiti:taskListener class="com.yb.listener.MyCompeteistener" event="create"/>
</extensionElements>
</userTask>
<exclusiveGateway gatewayDirection="Unspecified" id="_4" name="排他网关"/>
<userTask activiti:assignee="王大" activiti:exclusive="true" id="_5" name="总经理审批"/>
<userTask activiti:assignee="${assignee}" activiti:exclusive="true" id="_6" name="项目经理审批">
<extensionElements>
<activiti:taskListener class="com.yb.listener.MutiGroupsListener" event="create"/>
</extensionElements>
<multiInstanceLoopCharacteristics activiti:collection="${assignees}" activiti:elementVariable="assignee" isSequential="false">
<completionCondition><![CDATA[${
passCount/totalCount==1}]]></completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<endEvent id="_7" name="结束"/>
<sequenceFlow id="_8" sourceRef="_2" targetRef="_3"/>
<sequenceFlow id="_9" sourceRef="_3" targetRef="_4"/>
<sequenceFlow id="_10" name="大于三天" sourceRef="_4" targetRef="_5">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
day>3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_11" name="小于三天" sourceRef="_4" targetRef="_6">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
day<=3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_12" sourceRef="_5" targetRef="_7"/>
<sequenceFlow id="_13" name="都同意" sourceRef="_6" targetRef="_7">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
passCount/totalCount==1}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_14" name="不同意" sourceRef="_5" targetRef="_3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
status==0}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_15" name="都不同意" sourceRef="_6" targetRef="_3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${
passCount/totalCount==0}]]></conditionExpression>
</sequenceFlow>
</process>
<bpmndi:BPMNDiagram documentation="background