activiti并行网关执行时每个关联表的变化

简介: activiti并行网关执行时每个关联表的变化

activiti并行网关执行时每个关联表的变化

🔊流程图

📆 通过请假节点

image-20231214174123918

<?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/processdef">
  <process id="parallelGateway" name="并行网关" isExecutable="true">
    <startEvent id="startEvent1"></startEvent>
    <userTask id="student" name="请假" activiti:assignee="admin">
      <extensionElements>
        <modeler:initiator-can-complete xmlns:modeler="http://activiti.com/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-13B085EF-2E80-43D1-BEDF-8950B2A9B783" sourceRef="startEvent1" targetRef="student"></sequenceFlow>
    <endEvent id="sid-9AFEE86D-C779-494A-8ACD-D2AC0E96C5AD"></endEvent>
    <userTask id="userTask1" name="班长" activiti:assignee="test">
      <extensionElements>
        <modeler:initiator-can-complete xmlns:modeler="http://activiti.com/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
      </extensionElements>
    </userTask>
    <userTask id="userTask2" name="班主任" activiti:assignee="test2">
      <extensionElements>
        <modeler:initiator-can-complete xmlns:modeler="http://activiti.com/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
      </extensionElements>
    </userTask>
    <userTask id="userTask3" name="校长" activiti:assignee="test3">
      <extensionElements>
        <modeler:initiator-can-complete xmlns:modeler="http://activiti.com/modeler"><![CDATA[false]]></modeler:initiator-can-complete>
      </extensionElements>
    </userTask>
    <parallelGateway id="sid-5DDB2499-4CB7-46F5-BD50-455312B93033"></parallelGateway>
    <sequenceFlow id="sid-B6BDAB4C-31D7-4C0D-A691-5B1B0BA45CD5" sourceRef="student" targetRef="sid-5DDB2499-4CB7-46F5-BD50-455312B93033"></sequenceFlow>
    <parallelGateway id="sid-8B8D887B-14FC-4766-A0AA-558874F3ACD1"></parallelGateway>
    <sequenceFlow id="sid-7DFC8B7A-5B14-4B29-BA7A-04A8A796045D" sourceRef="sid-5DDB2499-4CB7-46F5-BD50-455312B93033" targetRef="userTask1"></sequenceFlow>
    <sequenceFlow id="sid-DCD4E730-E07A-4233-92B1-20F8902AFEC2" sourceRef="sid-5DDB2499-4CB7-46F5-BD50-455312B93033" targetRef="userTask2"></sequenceFlow>
    <sequenceFlow id="sid-9CEADDDB-3F74-41E6-AE39-58026D4C77E8" sourceRef="userTask2" targetRef="sid-8B8D887B-14FC-4766-A0AA-558874F3ACD1"></sequenceFlow>
    <sequenceFlow id="sid-68C89AA3-AC62-4F8F-9539-4F3743EAB039" sourceRef="userTask1" targetRef="sid-8B8D887B-14FC-4766-A0AA-558874F3ACD1"></sequenceFlow>
    <sequenceFlow id="sid-AA6BAF4E-2895-4B1F-9779-3F8B4B0529D2" sourceRef="sid-8B8D887B-14FC-4766-A0AA-558874F3ACD1" targetRef="userTask3"></sequenceFlow>
    <sequenceFlow id="sid-7D9A40CD-A52A-468F-87EB-1F8FB1C1045C" sourceRef="userTask3" targetRef="sid-9AFEE86D-C779-494A-8ACD-D2AC0E96C5AD"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_parallelGateway">
    <bpmndi:BPMNPlane bpmnElement="parallelGateway" id="BPMNPlane_parallelGateway">
      <bpmndi:BPMNShape bpmnElement="startEvent1" id="BPMNShape_startEvent1">
        <omgdc:Bounds height="30.000000000000004" width="30.0" x="468.3333161142144" y="16.666666004392862"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="student" id="BPMNShape_student">
        <omgdc:Bounds height="80.0" width="100.0" x="433.3333161142144" y="83.33333002196431"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-9AFEE86D-C779-494A-8ACD-D2AC0E96C5AD" id="BPMNShape_sid-9AFEE86D-C779-494A-8ACD-D2AC0E96C5AD">
        <omgdc:Bounds height="28.000000000000114" width="28.0" x="469.3333161142144" y="549.9999781449644"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="userTask1" id="BPMNShape_userTask1">
        <omgdc:Bounds height="80.0" width="100.0" x="316.6666540834644" y="266.6666560702858"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="userTask2" id="BPMNShape_userTask2">
        <omgdc:Bounds height="80.0" width="100.0" x="566.6666441493574" y="266.6666560702858"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="userTask3" id="BPMNShape_userTask3">
        <omgdc:Bounds height="80.0" width="100.00000000000011" x="433.3333161142144" y="433.3333161142144"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-5DDB2499-4CB7-46F5-BD50-455312B93033" id="BPMNShape_sid-5DDB2499-4CB7-46F5-BD50-455312B93033">
        <omgdc:Bounds height="40.0" width="40.0" x="463.3333161142145" y="216.6666580571072"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-8B8D887B-14FC-4766-A0AA-558874F3ACD1" id="BPMNShape_sid-8B8D887B-14FC-4766-A0AA-558874F3ACD1">
        <omgdc:Bounds height="40.0" width="40.0" x="463.3333161142144" y="366.66665209664296"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-13B085EF-2E80-43D1-BEDF-8950B2A9B783" id="BPMNEdge_sid-13B085EF-2E80-43D1-BEDF-8950B2A9B783">
        <omgdi:waypoint x="483.3333161142144" y="46.666666004392866"></omgdi:waypoint>
        <omgdi:waypoint x="483.3333161142144" y="83.33333002196431"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-DCD4E730-E07A-4233-92B1-20F8902AFEC2" id="BPMNEdge_sid-DCD4E730-E07A-4233-92B1-20F8902AFEC2">
        <omgdi:waypoint x="496.30695692247645" y="243.69301724884525"></omgdi:waypoint>
        <omgdi:waypoint x="566.6666441493574" y="280.5060535162372"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-9CEADDDB-3F74-41E6-AE39-58026D4C77E8" id="BPMNEdge_sid-9CEADDDB-3F74-41E6-AE39-58026D4C77E8">
        <omgdi:waypoint x="566.6666441493574" y="336.6666557722626"></omgdi:waypoint>
        <omgdi:waypoint x="495.83331616078056" y="379.1666521432091"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-AA6BAF4E-2895-4B1F-9779-3F8B4B0529D2" id="BPMNEdge_sid-AA6BAF4E-2895-4B1F-9779-3F8B4B0529D2">
        <omgdi:waypoint x="483.72242116915095" y="406.27754704170644"></omgdi:waypoint>
        <omgdi:waypoint x="483.56542443856506" y="433.3333161142144"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-7D9A40CD-A52A-468F-87EB-1F8FB1C1045C" id="BPMNEdge_sid-7D9A40CD-A52A-468F-87EB-1F8FB1C1045C">
        <omgdi:waypoint x="483.3333161142144" y="513.3333161142144"></omgdi:waypoint>
        <omgdi:waypoint x="483.3333161142144" y="549.9999781449644"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-68C89AA3-AC62-4F8F-9539-4F3743EAB039" id="BPMNEdge_sid-68C89AA3-AC62-4F8F-9539-4F3743EAB039">
        <omgdi:waypoint x="416.6666540834644" y="340.9523700154021"></omgdi:waypoint>
        <omgdi:waypoint x="471.4689092866094" y="378.531058924248"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-7DFC8B7A-5B14-4B29-BA7A-04A8A796045D" id="BPMNEdge_sid-7DFC8B7A-5B14-4B29-BA7A-04A8A796045D">
        <omgdi:waypoint x="471.2797447369608" y="244.61308667985355"></omgdi:waypoint>
        <omgdi:waypoint x="416.6666540834644" y="277.00804977025376"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-B6BDAB4C-31D7-4C0D-A691-5B1B0BA45CD5" id="BPMNEdge_sid-B6BDAB4C-31D7-4C0D-A691-5B1B0BA45CD5">
        <omgdi:waypoint x="483.5090115835925" y="163.33333002196431"></omgdi:waypoint>
        <omgdi:waypoint x="483.74508081597196" y="217.07842275886466"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

image-20231214174023591

image-20231214174145211

image-20231214174320506

📕通过一个并行节点

/**
 * 完成任务
 */
@Test
public void completeTask() {
   
   
    taskService.complete("137504");
}

image-20231214174522349

image-20231214174532264

image-20231214175637938

image-20231214174649151

image-20231214175405788

🖥️再通过一个并行节点

/**
 * 完成任务
 */
@Test
public void completeTask() {
   
   
    taskService.complete("137507");
}

image-20231214174812095

image-20231214174830993

image-20231214175021428

🔖再通过校长任务

/**
 * 完成任务
 */
@Test
public void completeTask() {
   
   
    taskService.complete("142503");
}

image-20231214175801430

image-20231214175810639

image-20231214175836412

image-20231214175925637

🖊️最后总结

🖲要熟练掌握技巧,一定多多坚持练习:骐骥一跃,不能十步;驽马十驾,功在不舍

搞笑点赞

目录
相关文章
33activiti - 并行网关(parallelGateWay)
33activiti - 并行网关(parallelGateWay)
308 0
|
6月前
|
XML JSON 前端开发
基于若依的ruoyi-nbcio流程管理系统仿钉钉流程json转bpmn的flowable的xml格式(支持并行网关)
基于若依的ruoyi-nbcio流程管理系统仿钉钉流程json转bpmn的flowable的xml格式(支持并行网关)
338 3
|
数据库
Activiti进阶篇-网关
Activiti进阶篇-网关
Activiti进阶篇-网关
activiti实战系列 排他网关(ExclusiveGateWay)
流程图     12.2:部署流程定义+启动流程实例 12.3:查询我的个人任务   12.4:完成我的个人任务 说明: 1)     一个排他网关对应一个以上的顺序流 2)     由排他网关流出的顺序流都有个conditionExpression元素,在内部维护返回boolean类型的决策结果。
1536 0
activiti实战系列 并行网关(parallelGateWay)
流程图 13.2:部署流程定义+启动流程实例 13.3:查询我的个人任务 13.4:完成我的个人任务 说明: 1) 一个流程中流程实例只有1个,执行对象有多个 2)  并行网关的功能是基于进入和外出的顺序流的: 分支(fork): 并行后的所有外出顺序流,为每个顺序流都创建一个并发分支。
1890 0
|
4月前
|
监控 负载均衡 Java
深入理解Spring Cloud中的服务网关
深入理解Spring Cloud中的服务网关
|
1月前
|
安全 5G 网络性能优化
|
2月前
|
监控 负载均衡 安全
微服务(五)-服务网关zuul(一)
微服务(五)-服务网关zuul(一)
|
3月前
|
运维 Kubernetes 安全
利用服务网格实现全链路mTLS(一):在入口网关上提供mTLS服务
阿里云服务网格(Service Mesh,简称ASM)提供了一个全托管式的服务网格平台,兼容Istio开源服务网格,用于简化服务治理,包括流量管理和拆分、安全认证及网格可观测性,有效减轻开发运维负担。ASM支持通过mTLS提供服务,要求客户端提供证书以增强安全性。本文介绍如何在ASM入口网关上配置mTLS服务并通过授权策略实现特定用户的访问限制。首先需部署ASM实例和ACK集群,并开启sidecar自动注入。接着,在集群中部署入口网关和httpbin应用,并生成mTLS通信所需的根证书、服务器证书及客户端证书。最后,配置网关上的mTLS监听并设置授权策略,以限制特定客户端对特定路径的访问。
130 2