当前位置:网站首页>【activiti】activiti介绍
【activiti】activiti介绍
2022-07-24 05:19:00 【你怎么不笑了】
Activiti
官网:https://www.activiti.org/
工作流(workflow),就是通过计算机对业务流程自动化执行管理。主要解决的是"在多个参与者之间按照某种预定义的规则自动进行传递文档、信息或任务的过程,从而实现对某个预期的业务目标,或者促使此目标的实现"
Activiti介绍
Activiti是一个工作流引擎,activiti可以将业务系统中复杂的业务流程抽取出来,使用专门的建模语言BPMN2.0进行定义,业务流程按照预先定义的流程进行执行,实现了系统流程由activiti进行管理,减少业务系统由于流程的变更而进行系统升级改造的工作量,从而提高系统的健壮性,同时减少系统开发维护成本。
BPMN介绍
BPMN(Business Process Model AndNotation)- 业务流程模型和符号 是由BPMI(BusinessProcess Management Initiative)开发的一套标准的业务流程建模符号,使用BPMN提供的符号可以创建业务流程。
BPMN 是目前被各 BPM 厂商广泛接受的 BPM 标准。Activiti 就是使用 BPMN 2.0 进行流程建模、流程执行管理,它包括很多的建模符号,比如:
Event
用一个圆圈表示,它是流程中运行过程中发生的事情。

活动用圆角矩形表示,一个流程由一个活动或多个活动组成


上面的Bpmn流程图形实际是一个.bpmn后缀的文件,Bpmn图形其实是通过xml表示业务流程,使用文本编辑器打开:
<?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/test">
<process id="myProcess" name="My process" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<userTask id="usertask1" name="创建请假单"></userTask>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
<userTask id="usertask2" name="部门经理审核"></userTask>
<sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
<userTask id="usertask3" name="人事复核"></userTask>
<sequenceFlow id="flow3" sourceRef="usertask2" targetRef="usertask3"></sequenceFlow>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow4" sourceRef="usertask3" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
<bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="130.0" y="160.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55.0" width="105.0" x="210.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
<omgdc:Bounds height="55.0" width="105.0" x="360.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
<omgdc:Bounds height="55.0" width="105.0" x="510.0" y="150.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="660.0" y="160.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="165.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="210.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="315.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="360.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="465.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="510.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="615.0" y="177.0"></omgdi:waypoint>
<omgdi:waypoint x="660.0" y="177.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
使用方式
部署activiti
Activiti是一个工作流引擎(其实就是一堆jar包API),业务系统访问(操作)activiti的接口,就可以方便的操作流程相关数据,这样就可以把工作流环境与业务系统的环境集成在一起。
流程定义
使用activiti流程建模工具(activity-designer)定义业务流程(.bpmn文件) 。
.bpmn文件就是业务流程定义文件,通过xml定义业务流程。
流程定义部署
activiti部署业务流程定义(.bpmn文件)。
使用activiti提供的api把流程定义内容存储起来,在Activiti执行过程中可以查询定义的内容
Activiti执行把流程定义内容存储在数据库中
启动一个流程实例
流程实例也叫:ProcessInstance
启动一个流程实例表示开始一次业务流程的运行。
在员工请假流程定义部署完成后,如果张三要请假就可以启动一个流程实例,如果李四要请假也启动一个流程实例,两个流程的执行互相不影响。
用户查询待办任务(Task)
因为现在系统的业务流程已经交给activiti管理,通过activiti就可以查询当前流程执行到哪了,当前用户需要办理什么任务了,这些activiti帮我们管理了,而不需要开发人员自己编写在sql语句查询。
用户办理任务
用户查询待办任务后,就可以办理某个任务,如果这个任务办理完成还需要其它用户办理,比如采购单创建后由部门经理审核,这个过程也是由activiti帮我们完成了。
流程结束
当任务办理完成没有下一个任务结点了,这个流程实例就完成了。
边栏推荐
- mysql查询手机号码后四位,前几位怎么写?
- jsp标签
- Inventory Poka ecological potential project | cross chain characteristics to promote the prosperity of multi track
- There are three ways to create in Polkadot - parallel chain, parallel thread, and smart contract
- 稀缺性之于Web3:如何成为去中心化世界的胜利者
- Cess test online line! The first decentralized storage network to provide multiple application scenarios
- Public chain Sui layer1 network
- Gavin wood, founder of Poka: what will happen to Poka governance V2?
- 【百度地图API】您所使用的地图JS API版本过低,已不再维护,为保证地图基本功能 正常使用,请尽快升级到最新版地图JS API
- LP双币流动性质押挖矿系统逻辑开发分析
猜你喜欢

spark 广播变量和累加器使用和原理

网页播放rtsp视频流

渗透测试知识---行业术语

MySQL之函数运用

Canvas - rotate

Vulnhub-Funbox: Rookie(Funbox2)靶机渗透
![[Baidu map API] the version of the map JS API you are using is too low and no longer maintained. In order to ensure the normal use of the basic functions of the map, please upgrade to the latest versi](/img/d5/b0e4cc4155673d6042a0e39de4eddf.png)
[Baidu map API] the version of the map JS API you are using is too low and no longer maintained. In order to ensure the normal use of the basic functions of the map, please upgrade to the latest versi

Mapboxgl + GeoServer configuration local map tutorial

mysqldump 导出中文乱码

达梦数据库_LENGTH_IN_CHAR和CHARSET的影响情况
随机推荐
3. Draw a five sided cone with a square bottom on the screen. The bottom of the cone is on the xoz plane and the top of the cone is on the Y axis. Use the following figure to map the texture of the fo
利用流媒体将RSTP流转成WEB端播放(二)[可回看]
渗透测试知识---行业术语
MySQL误操作后如何快速恢复数据
The profound meaning of unlimited ecological development in Poka -- Multidimensional Interpretation of parallel chain
首届波卡黑客松项目「Manta Network」的进击之路
人生警示格言
Flink重启策略
OpenGL draws two points on the screen, a blue point on the right, using anti aliasing technology, and a red point on the left, without anti aliasing technology. Compare the difference between the two
读《悟道:一位IT高管20年的职场心经》
Flink 时间流处理
达梦数据库_DISQL下各种连接数据库的方法和执行SQL、脚本的方法
Why is music NFT popular? Polkadot may become the best choice for developing music NFT
Unknown collation: ‘utf8mb4_0900_ai_ci‘的解决方法
Use of wechat applet map
Fusdt流动性质押挖矿开发逻辑系统原理
sunset: noontide靶机渗透-vulnhub
Flink 并行度的理解(parallel)
【vsphere高可用】主机和虚拟机故障监测工作原理
Wechat applet returns parameters or trigger events