• Flowable工作流之候选人


    1. 前言

    有的时候,一个任务节点会存在多个候选人,例如 zhangsan 提交一个任务,这个任务既可以 lisi 处理,又可以 wangwu 处理,那么针对这种多个任务候选人的情况,我们该如何处理?今天一起来看看

    2. 候选人的相关处理

    2.1. 绘制流程图

    在这里插入图片描述
    首先我们使用的流程图如上,但是在为 提交请假申请 设置分配用户的时候,我们设置多个用户,如下图

    在这里插入图片描述
    设置完成后,我们下载这个流程文件,来看下对应的 XML 文件

    
    <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:flowable="http://flowable.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.flowable.org/processdef" exporter="Flowable Open Source Modeler"
                 exporterVersion="6.7.2">
        <process id="Leave2" name="Leave2" isExecutable="true">
            <documentation>公司请假申请流程documentation>
            <startEvent id="sid-EDEC0102-C387-4F9A-B5EF-157587793A4D" flowable:formFieldValidation="true">startEvent>
            <userTask id="userId" name="请假申请" flowable:candidateUsers="${candidate1},${candidate2},${candidate3}"
                      flowable:formFieldValidation="true">userTask>
            <sequenceFlow id="sid-A62E0666-ABAF-4A31-B7A6-43157D7F59B2" sourceRef="sid-EDEC0102-C387-4F9A-B5EF-157587793A4D"
                          targetRef="userId">sequenceFlow>
            <sequenceFlow id="sid-0EED4703-83C6-4B57-9015-A75B06927C0C" sourceRef="userId"
                          targetRef="sid-FF0BB60C-47D5-4DB5-8C3E-C21A1DFC1F81">sequenceFlow>
            <parallelGateway id="sid-FF0BB60C-47D5-4DB5-8C3E-C21A1DFC1F81">parallelGateway>
            <userTask id="xmjlId" name="项目经理审批" flowable:assignee="${ProjectManager}" flowable:formFieldValidation="true">
                <extensionElements>
                    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">
                        modeler:initiator-can-complete>
                extensionElements>
            userTask>
            <userTask id="jsjlId" name="技术经理审批" flowable:assignee="${TechnicalManager}" flowable:formFieldValidation="true">
                <extensionElements>
                    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">
                        modeler:initiator-can-complete>
                extensionElements>
            userTask>
            <sequenceFlow id="sid-7A21D68A-3115-447A-B147-CDC6144D6D71" sourceRef="sid-FF0BB60C-47D5-4DB5-8C3E-C21A1DFC1F81"
                          targetRef="jsjlId">sequenceFlow>
            <sequenceFlow id="sid-EF7EDB7C-3719-485D-85C6-EDF2DA8DBE33" sourceRef="sid-FF0BB60C-47D5-4DB5-8C3E-C21A1DFC1F81"
                          targetRef="xmjlId">sequenceFlow>
            <sequenceFlow id="sid-25F6DB53-F695-4A0D-BBFC-6B8A45371EDF" sourceRef="jsjlId"
                          targetRef="sid-B961DC17-1F54-4B6B-BCA9-9EA15DEFDC29">sequenceFlow>
            <parallelGateway id="sid-B961DC17-1F54-4B6B-BCA9-9EA15DEFDC29">parallelGateway>
            <sequenceFlow id="sid-C7AA05DF-F958-476D-8710-F9B8DD51BE85" sourceRef="xmjlId"
                          targetRef="sid-B961DC17-1F54-4B6B-BCA9-9EA15DEFDC29">sequenceFlow>
            <exclusiveGateway id="sid-3C064FB3-2132-4C38-88E0-F1AD3CA14A1C">exclusiveGateway>
            <sequenceFlow id="sid-4C96EBB0-7EAC-4FD5-BF06-6551F53C9D0D" sourceRef="sid-B961DC17-1F54-4B6B-BCA9-9EA15DEFDC29"
                          targetRef="sid-3C064FB3-2132-4C38-88E0-F1AD3CA14A1C">sequenceFlow>
            <userTask id="zjlId" name="总经理审批" flowable:assignee="${boss}" flowable:formFieldValidation="true">
                <extensionElements>
                    <modeler:initiator-can-complete xmlns:modeler="http://flowable.org/modeler">
                        modeler:initiator-can-complete>
                extensionElements>
            userTask>
            <endEvent id="sid-94B5337F-CEDF-4FF3-A051-C90E82D4E670">endEvent>
            <sequenceFlow id="sid-3E165D65-0F3E-4BE1-A3A4-980746B9B473" sourceRef
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
  • 相关阅读:
    Android网络性能监控方案 android线上性能监测
    Canal安装
    RNA核糖核酸修饰荧光染料|HiLyte Fluor 488/555/594/647/680/750标记RNA核糖核酸
    Windows及Centos系统升级curl
    VSCode常用快捷键记录
    golang流程控制:if分支、switch分支和fallthrough switch穿透
    【无标题】
    计算机视觉(CV)技术的优势和挑战
    MAX98390CEWX D类放大器,集成动态扬声器管理(MAX98390)
    LeetCode --- 1935. Maximum Number of Words You Can Type 解题报告
  • 原文地址:https://blog.csdn.net/weixin_38192427/article/details/127591856