jeecgflow之camunda工作流-并行网关

引言

书接上回,继续三国流程系列教程。 本文主要讲解并行网关。

并行网关允许流程中的多个任务同时执行,从而提高流程的执行效率。

并行网关会忽视序列流上的条件设置。

并行网关分为两部分。

Fork: 用于任务开始

Join:用于任务结束

WX20231121-094924@2x.png

体验文章demo演示站点: JeecgFlow

需求

假设作为将军的张飞要发动一个出征,填写出兵人数和攻占城市

先左右军师并行审核

再由主公进行最后决断。

BPMN建模

WX20231121-095137@2x.png

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0h8qtyr" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.10.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.19.0">
  <bpmn:process id="Process_1f40ryt" name="出征并行流程" isExecutable="true">
    <bpmn:startEvent id="StartEvent_1" camunda:initiator="start">
      <bpmn:outgoing>Flow_18wovhb</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_18wovhb" sourceRef="StartEvent_1" targetRef="Activity_0ytoxfo" />
    <bpmn:userTask id="Activity_0ytoxfo" name="出征申请" camunda:assignee="${general}">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="number" label="出兵人数" type="long" />
          <camunda:formField id="city" label="城市" type="string" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_18wovhb</bpmn:incoming>
      <bpmn:outgoing>Flow_04b290y</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_04b290y" sourceRef="Activity_0ytoxfo" targetRef="Gateway_0hlq55i" />
    <bpmn:parallelGateway id="Gateway_0hlq55i">
      <bpmn:incoming>Flow_04b290y</bpmn:incoming>
      <bpmn:outgoing>Flow_0iqw5r6</bpmn:outgoing>
      <bpmn:outgoing>Flow_18hrbjg</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:sequenceFlow id="Flow_0iqw5r6" sourceRef="Gateway_0hlq55i" targetRef="Activity_0y1hr3s" />
    <bpmn:userTask id="Activity_0y1hr3s" name="左军师" camunda:assignee="${leftGuide}">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="comment" label="评论" type="string" />
          <camunda:formField id="imageUrl" label="图片" type="string" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0iqw5r6</bpmn:incoming>
      <bpmn:outgoing>Flow_0hiapj2</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_18hrbjg" sourceRef="Gateway_0hlq55i" targetRef="Activity_17fwc6q" />
    <bpmn:userTask id="Activity_17fwc6q" name="右军师" camunda:assignee="${rightGuide}">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="comment" label="评论" type="string" />
          <camunda:formField id="imageUrl" label="图片" type="string" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_18hrbjg</bpmn:incoming>
      <bpmn:outgoing>Flow_1ozncyr</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_0hiapj2" sourceRef="Activity_0y1hr3s" targetRef="Gateway_0oz16w0" />
    <bpmn:parallelGateway id="Gateway_0oz16w0">
      <bpmn:incoming>Flow_0hiapj2</bpmn:incoming>
      <bpmn:incoming>Flow_1ozncyr</bpmn:incoming>
      <bpmn:outgoing>Flow_0t30p7o</bpmn:outgoing>
    </bpmn:parallelGateway>
    <bpmn:sequenceFlow id="Flow_1ozncyr" sourceRef="Activity_17fwc6q" targetRef="Gateway_0oz16w0" />
    <bpmn:sequenceFlow id="Flow_0t30p7o" sourceRef="Gateway_0oz16w0" targetRef="Activity_0s9d8t2" />
    <bpmn:userTask id="Activity_0s9d8t2" name="主公" camunda:assignee="${leader}">
      <bpmn:extensionElements>
        <camunda:formData>
          <camunda:formField id="comment" label="评论" type="string" />
          <camunda:formField id="imageUrl" label="图片" type="string" />
        </camunda:formData>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0t30p7o</bpmn:incoming>
      <bpmn:outgoing>Flow_0nkb62t</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:endEvent id="Event_0ik6407">
      <bpmn:incoming>Flow_0nkb62t</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:sequenceFlow id="Flow_0nkb62t" sourceRef="Activity_0s9d8t2" targetRef="Event_0ik6407" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1f40ryt">
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="179" y="219" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1sh9j2d_di" bpmnElement="Activity_0ytoxfo">
        <dc:Bounds x="270" y="197" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_04uj71o_di" bpmnElement="Gateway_0hlq55i">
        <dc:Bounds x="425" y="212" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_199rpkp_di" bpmnElement="Activity_17fwc6q">
        <dc:Bounds x="550" y="300" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0xwo1vg_di" bpmnElement="Activity_0y1hr3s">
        <dc:Bounds x="550" y="80" width="100" height="80" />
        <bpmndi:BPMNLabel />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_188eea0_di" bpmnElement="Gateway_0oz16w0">
        <dc:Bounds x="735" y="212" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1sdf99a_di" bpmnElement="Activity_0s9d8t2">
        <dc:Bounds x="870" y="197" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_0ik6407_di" bpmnElement="Event_0ik6407">
        <dc:Bounds x="1062" y="219" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="Flow_18wovhb_di" bpmnElement="Flow_18wovhb">
        <di:waypoint x="215" y="237" />
        <di:waypoint x="270" y="237" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_04b290y_di" bpmnElement="Flow_04b290y">
        <di:waypoint x="370" y="237" />
        <di:waypoint x="425" y="237" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0iqw5r6_di" bpmnElement="Flow_0iqw5r6">
        <di:waypoint x="450" y="212" />
        <di:waypoint x="450" y="120" />
        <di:waypoint x="550" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18hrbjg_di" bpmnElement="Flow_18hrbjg">
        <di:waypoint x="450" y="262" />
        <di:waypoint x="450" y="340" />
        <di:waypoint x="550" y="340" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1ozncyr_di" bpmnElement="Flow_1ozncyr">
        <di:waypoint x="650" y="340" />
        <di:waypoint x="760" y="340" />
        <di:waypoint x="760" y="262" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0hiapj2_di" bpmnElement="Flow_0hiapj2">
        <di:waypoint x="650" y="120" />
        <di:waypoint x="760" y="120" />
        <di:waypoint x="760" y="212" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0t30p7o_di" bpmnElement="Flow_0t30p7o">
        <di:waypoint x="785" y="237" />
        <di:waypoint x="870" y="237" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0nkb62t_di" bpmnElement="Flow_0nkb62t">
        <di:waypoint x="970" y="237" />
        <di:waypoint x="1062" y="237" />
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

角色扮演

将军

张飞发动一个并行网关流程。如图

WX20231121-095441@2x.png
填写表单信息,用于启动流程。

WX20231121-095515@2x.png
在我发起的菜单中可以看到刚刚发起的流程。

WX20231121-095656@2x.png
在预览页面可以看到流程当前的运行情况。

军师

左军师诸葛亮,右军师庞统。都需要对这个流程进行审批。 此处只说明诸葛的操作。

WX20231121-095835@2x.png
在待办任务中可以看到详情可以看到审批详情。进行同意操作。

WX20231121-095917@2x.png
在已办流程可以自己的审批信息。

庞统操作一样。

主公

刘备登录系统, 同样面对待办任务。

与上图军师操作一样

扩展

JeecgBoot集成camuda工作流引擎-并行网关-视频教程

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/558993.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【Camera Framework笔记】二、Camera Native Framework架构①

一、总体架构&#xff1a; service -> opencamera -> client&#xff08;api1/api2&#xff09; -> device3&#xff08;hal3&#xff09; | | &#xff08;不opencamera…

kubernetes学习

1、应用部署方式演变 2、kubernetes介绍 3、kubernetes组件 4、kubernetes概念 5、环境搭建-环境规划 集群类型&#xff1a; 安装方式&#xff1a; 主机规划&#xff1a; 6、环境搭建-主机安装 使用虚拟机安装三台centos7&#xff08;一主二从&#xff09;&#xff0c;然后在…

相机摄影入门技巧,数码摄影技巧大全

一、资料前言 本套数码相机摄影资料&#xff0c;大小1.08G&#xff0c;共有42个文件。 二、资料目录 《aking人像摄影技巧分享》.pdf 《Nikon.D90数码单反摄影技巧大全》FUN视觉.全彩版.pdf 《不可不学的摄影技巧》.pdf 《常用场景摄影》.pdf 《单反数码摄影专家技法》.…

ASP.NET基于Web的招投标系统的设计与实现

摘 要 招标拍卖的历史悠久&#xff0c;在近两千年的发展历程中&#xff0c;人们对拍卖的理论和技术做了大量的探讨。随着计算机网络技术的迅猛发展和日益成熟&#xff0c;为了提高招投标及采购工作的效率&#xff0c;为廉政建设和防止腐败提供技术保障&#xff0c;传统的拍…

JS -关于对象相关介绍

在JS中&#xff0c;除去基本的数据类型&#xff0c;还有包含对象这种复合数据类型&#xff0c;他可以储存多个键值对&#xff0c;并且每个键都是唯一的&#xff0c;并且在对象中可以包含各种数据类型的值&#xff0c;包括其他对象&#xff0c;数组&#xff0c;函数等。对象是Ja…

[AI]-(第0期):认知深度学习

深度学习是一种人工智能&#xff08;AI&#xff09;方法&#xff0c;用于教计算机以受人脑启发的方式处理数据。 深度学习模型可以识别图片、文本、声音和其他数据中的复杂模式&#xff0c;从而生成准确的见解和预测。 您可以使用深度学习方法自动执行通常需要人工智能完成的…

linux 基础命令docker及防火墙iptables详解

应用场景&#xff1a; web应用自动打包和发布 自动化测试&#xff0c;持续集成、发布 在服务环境中部署后台应用 搭建paaS平台 安装应用 apt install docker.io#kali中 配置docker源&#xff0c;文件位置/etc/docker/daemon.json { "registry-mirrors": [ "h…

Python 基于 OpenCV 视觉图像处理实战 之 OpenCV 简单人脸检测/识别实战案例 之一 简单人脸识别

Python 基于 OpenCV 视觉图像处理实战 之 OpenCV 简单人脸检测/识别实战案例 之一 简单人脸识别 目录 Python 基于 OpenCV 视觉图像处理实战 之 OpenCV 简单人脸检测/识别实战案例 之一 简单人脸识别 一、简单介绍 二、简单人脸识别实现原理 三、简单人脸识别案例实现简单步…

ContextMenuStrip内容菜单源对象赋值学习笔记(含源码)

一、前言 MetroTileItem属于第三方控件,无法定义ContextMenuStrip属性 想实现某子项点击菜单时,与源控件(按钮metroTileItem)的某值对应,用于动态控制按钮的状态或方法 1.1 效果 二、实现方法 2.1 方法1 (代码,说明见注释) private void metroTileItem_MouseDown(o…

基于Springboot的小区物业管理系统

基于SpringbootVue的小区物业管理系统的设计与实现 开发语言&#xff1a;Java数据库&#xff1a;MySQL技术&#xff1a;SpringbootMybatis工具&#xff1a;IDEA、Maven、Navicat 系统展示 用户登录 首页 用户管理 员工管理 业主信息管理 费用信息管理 楼房信息管理 保修信息…

攻防世界---reverse_re3

1.下载附件&#xff0c;先查壳&#xff1a;无壳 2.在IDA中分析&#xff0c;shiftfnf5&#xff0c;看到一串长得很像flag的flag 3.根据提示我们需要找到输入&#xff0c;再进行md5转换才能得到flag flag{md5(your input)} 4.双击这个句话&#xff0c;点进去想查看信息&#xff0…

MongoDB学习【一】MongoDB简介和部署

MongoDB简介 MongoDB是一种开源的、面向文档的、分布式的NoSQL数据库系统&#xff0c;由C语言编写而成。它的设计目标是为了适应现代Web应用和大数据处理场景的需求&#xff0c;提供高可用性、横向扩展能力和灵活的数据模型。 主要特点&#xff1a; 文档模型&#xff1a; Mon…

西宁市初中生地会考报名照片尺寸要求及手机自拍方法

西宁市初中生地会考即将到来&#xff0c;对于参加考试的同学们来说&#xff0c;准备一张符合规格的报名照片是整个报名流程中不可或缺的一环。一张规范的证件照不仅展示了学生的精神面貌&#xff0c;同时也是顺利报名的重要条件之一。本文将详细介绍西宁市初中生地会考报名所需…

SSDReporter for Mac:全面检测SSD健康,预防数据丢失,让您的Mac运行更稳定

SSDReporter for Mac是一款专为Mac用户设计的固态硬盘&#xff08;SSD&#xff09;健康状况检测工具&#xff0c;旨在帮助用户全面了解并监控其Mac设备中SSD的工作状态&#xff0c;从而确保数据的完整性和设备的稳定性。 这款软件具有多种强大的功能。首先&#xff0c;它能够定…

【分治】Leetcode 库存管理 III

题目讲解 LCR 159. 库存管理 III 本题的含义就是让求出最小的k个数 算法讲解 class Solution { public:void my_qsort(vector<int>& nums, int l, int r){if(l > r) return ;int i l, left l-1, right r1;int key nums[rand() % (r - l 1) l];//完成分三…

深度学习基础之《TensorFlow框架(12)—图片数据》

一、图像基本知识 1、如何转换图片文件 回忆&#xff1a;之前我们在特征抽取中讲过如何将文本处理成数据 思考&#xff1a;如何将图片文件转换成机器学习算法能够处理的数据&#xff1f; 我们经常接触到的图片有两种&#xff0c;一种是黑白图片&#xff08;灰度图&#xff09;…

C++ - STL详解—vector类

一. vector的概念 向量&#xff08;Vector&#xff09;是一个封装了动态大小数组的顺序容器&#xff08;Sequence Container&#xff09;。跟任意其它类型容器一样&#xff0c;它能够存放各种类型的对象。可以简单的认为&#xff0c;向量是一个能够存放任意类型的动态数组。 …

阿里云ECS服务器安装docker

首先查看阿里云ECS的服务器的版本 cat /etc/redhat-release如果是Alibaba Cloud Linux release 3,请执行以下命令 添加docker-ce的dnf源。 sudo dnf config-manager --add-repohttps://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo安装Alibaba Cloud Linux 3专…

深度学习每周学习总结P5(运动鞋识别)

&#x1f368; 本文为&#x1f517;365天深度学习训练营 中的学习记录博客&#x1f356; 原作者&#xff1a;K同学啊 | 接辅导、项目定制 –来自百度网盘超级会员V5的分享 目录 0. 总结1. 数据导入及处理部分2. 加载数据集3.模型构建部分3.1 模型构建3.2 公式推导 4. 设置超参…

小型燃气站3D可视化:打造安全高效的燃气新时代

随着科技的不断进步&#xff0c;越来越多的行业开始融入3D可视化技术&#xff0c;燃气行业也不例外。 小型燃气站作为城市燃气供应的重要节点&#xff0c;其安全性和运行效率至关重要。传统的燃气站管理方式往往依赖于人工巡检和纸质记录&#xff0c;这种方式不仅效率低下&…
最新文章