Activiti6+SpringBoot---会签功能学习-2

文章目录

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值