第1篇:Flowable简介
采用springboot+flowable快速實現工作流
文章目錄
- 一、什么是BPMN?
- 二、什么是Flowable?
- 2.1. 官方描述如下
- 2.2. 大白話理解
- 2.3. 官方在線文檔
- 2.4. Flowable官網
- 2.5. Flowable開源代碼倉庫
- 2.6. Flowable 最新版本(V6.4.2)截止目前下載地址
- 2.6.1. Tomcat 版本安裝包
- 2.6.2. EAR版本版本安裝包
- 2.6.3. Flowable源代碼(V6.4.2)下載地址
- 三、 Flowable流程示例
- 3.1. Flowable的BPMN流程圖
- 3.2. 流程圖的BMPN文件如下
一、什么是BPMN?
- 大白話理解:
BPMN是一套符號的標準,這些符號描述了如果做一個業務,并且這個業務在做的過程中被人監控和控制。業務人員和開發人員通過這套圖形可以很好的完成協作。
二、什么是Flowable?
2.1. 官方描述如下
- Flowable提供了一個組高效的核心開源業務流程引擎,為開發人員,系統管理員和業務用戶提供工作流和業務流程管理(BPM)平臺。全部用Java編寫,并且基于Apache 2.0許可的開源,代碼在社區維護。其核心是一個快速,經過試驗和測試的動態BPMN流程引擎,附帶DMN決策表和CMMN Case管理引擎。
2.2. 大白話理解
- Flowable是BPMN的一個基于java的軟件實現,不過Flowable不僅僅包括BPMN,還有DMN決策表和CMMN Case管理引擎,并且有自己的用戶管理、- 微服務API等一系列功能,是一個服務平臺。
2.3. 官方在線文檔
Flowable BPMN 用戶手冊 (v 6.5.0-SNAPSHOT)
http://www.shareniu.com/flowable6.5_zh_document/bpm/index.html#
Flowable DOCS (v 6.4.2):
https://www.flowable.org/docs/userguide/index.html
Flowable BPMN 用戶手冊 (v 6.3.0):
https://tkjohn.github.io/flowable-userguide/
2.4. Flowable官網
https://www.flowable.org/
2.5. Flowable開源代碼倉庫
https://github.com/flowable/flowable-engine
2.6. Flowable 最新版本(V6.4.2)截止目前下載地址
2.6.1. Tomcat 版本安裝包
https://github.com/flowable/flowable-engine/releases/download/flowable-6.4.0/tomcat-flowable-6.4.0.zip
2.6.2. EAR版本版本安裝包
https://github.com/flowable/flowable-engine/releases/download/flowable-6.4.2/flowable-6.4.2.zip
2.6.3. Flowable源代碼(V6.4.2)下載地址
https://codeload.github.com/flowable/flowable-engine/zip/flowable-6.4.2
三、 Flowable流程示例
一個簡單度假申請流程主要過程如下:
- 1、員工提交請假信息,如工號,請假天數
- 2、經理點擊審批通過或者拒絕
- 3、如果拒絕直接進入系統發郵件服務通知員工
- 4、如果通過系統記錄該員工的請假天數,減少可用天數
- 5、員工看到自己請假審批通過,點擊完成請假。
3.1. Flowable的BPMN流程圖
3.2. 流程圖的BMPN文件如下
<?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: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"><process id="holidayRequest" name="Holiday Request" isExecutable="true"><startEvent id="startEvent"></startEvent><sequenceFlow id="sequenceFlow-3fa7af74-df9a-4d3a-b0eb-10b20e7dc202" sourceRef="startEvent" targetRef="approveTask"></sequenceFlow><userTask id="approveTask" name="經理通過或駁回申請"></userTask><sequenceFlow id="sequenceFlow-d9127dc0-158f-4169-b61b-99226ffe8494" sourceRef="approveTask" targetRef="decision"></sequenceFlow><exclusiveGateway id="decision"></exclusiveGateway><serviceTask id="externalSystemCall" name="系統記錄申請天數" flowable:class="org.flowable.CallExternalSystemDelegate"></serviceTask><sequenceFlow id="sequenceFlow-6232f578-3975-4d7e-81f2-43b242d33ebd" sourceRef="externalSystemCall" targetRef="holidayApprovedTask"></sequenceFlow><userTask id="holidayApprovedTask" name="員工查看申請通過"></userTask><sequenceFlow id="sequenceFlow-29fd3375-9bcb-42f2-bb6f-63ae1f98813a" sourceRef="holidayApprovedTask" targetRef="approveEnd"></sequenceFlow><serviceTask id="sendRejectionMail" name="發送駁回郵件" flowable:class="org.flowable.SendRejectionMail"></serviceTask><sequenceFlow id="sequenceFlow-b390b442-2411-44a9-96eb-3c129d4c8408" sourceRef="sendRejectionMail" targetRef="rejectEnd"></sequenceFlow><endEvent id="approveEnd"></endEvent><endEvent id="rejectEnd"></endEvent><sequenceFlow id="sequenceFlow-6f21d3e2-2e49-4b00-9aae-0b71d861a177" name="駁回" sourceRef="decision" targetRef="sendRejectionMail"><conditionExpression xsi:type="tFormalExpression"><![CDATA[${!approved}]]></conditionExpression></sequenceFlow><sequenceFlow id="sequenceFlow-2470619b-fa36-440b-a231-b7bd226c23bb" name="通過" sourceRef="decision" targetRef="externalSystemCall"><conditionExpression xsi:type="tFormalExpression"><![CDATA[${approved}]]></conditionExpression></sequenceFlow></process><bpmndi:BPMNDiagram id="BPMNDiagram_holidayRequest"><bpmndi:BPMNPlane bpmnElement="holidayRequest" id="BPMNPlane_holidayRequest"><bpmndi:BPMNShape bpmnElement="startEvent" id="BPMNShape_startEvent"><omgdc:Bounds height="30.0" width="30.0" x="0.0" y="95.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="approveTask" id="BPMNShape_approveTask"><omgdc:Bounds height="60.0" width="100.0" x="80.0" y="80.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="decision" id="BPMNShape_decision"><omgdc:Bounds height="40.0" width="40.0" x="230.0" y="90.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="externalSystemCall" id="BPMNShape_externalSystemCall"><omgdc:Bounds height="60.0" width="100.0" x="320.0" y="1.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="holidayApprovedTask" id="BPMNShape_holidayApprovedTask"><omgdc:Bounds height="60.0" width="100.0" x="470.0" y="1.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="sendRejectionMail" id="BPMNShape_sendRejectionMail"><omgdc:Bounds height="60.0" width="100.0" x="320.0" y="160.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="approveEnd" id="BPMNShape_approveEnd"><omgdc:Bounds height="28.0" width="28.0" x="620.0" y="16.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="rejectEnd" id="BPMNShape_rejectEnd"><omgdc:Bounds height="28.0" width="28.0" x="505.0" y="175.0"></omgdc:Bounds></bpmndi:BPMNShape><bpmndi:BPMNEdge bpmnElement="sequenceFlow-2470619b-fa36-440b-a231-b7bd226c23bb" id="BPMNEdge_sequenceFlow-2470619b-fa36-440b-a231-b7bd226c23bb"><omgdi:waypoint x="250.0" y="90.0"></omgdi:waypoint><omgdi:waypoint x="250.0" y="31.0"></omgdi:waypoint><omgdi:waypoint x="319.99999999999284" y="31.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-3fa7af74-df9a-4d3a-b0eb-10b20e7dc202" id="BPMNEdge_sequenceFlow-3fa7af74-df9a-4d3a-b0eb-10b20e7dc202"><omgdi:waypoint x="29.949998618355412" y="110.0"></omgdi:waypoint><omgdi:waypoint x="80.0" y="110.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-6232f578-3975-4d7e-81f2-43b242d33ebd" id="BPMNEdge_sequenceFlow-6232f578-3975-4d7e-81f2-43b242d33ebd"><omgdi:waypoint x="419.95000000000005" y="31.0"></omgdi:waypoint><omgdi:waypoint x="470.0" y="31.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-b390b442-2411-44a9-96eb-3c129d4c8408" id="BPMNEdge_sequenceFlow-b390b442-2411-44a9-96eb-3c129d4c8408"><omgdi:waypoint x="419.949999999997" y="189.66442953020135"></omgdi:waypoint><omgdi:waypoint x="505.00030595247523" y="189.0936221647077"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-d9127dc0-158f-4169-b61b-99226ffe8494" id="BPMNEdge_sequenceFlow-d9127dc0-158f-4169-b61b-99226ffe8494"><omgdi:waypoint x="179.9499999999898" y="110.0"></omgdi:waypoint><omgdi:waypoint x="230.0" y="110.0"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-29fd3375-9bcb-42f2-bb6f-63ae1f98813a" id="BPMNEdge_sequenceFlow-29fd3375-9bcb-42f2-bb6f-63ae1f98813a"><omgdi:waypoint x="569.9499999999988" y="31.0"></omgdi:waypoint><omgdi:waypoint x="582.0" y="31.0"></omgdi:waypoint><omgdi:waypoint x="582.0" y="31.0"></omgdi:waypoint><omgdi:waypoint x="620.0025321198765" y="30.268220825690175"></omgdi:waypoint></bpmndi:BPMNEdge><bpmndi:BPMNEdge bpmnElement="sequenceFlow-6f21d3e2-2e49-4b00-9aae-0b71d861a177" id="BPMNEdge_sequenceFlow-6f21d3e2-2e49-4b00-9aae-0b71d861a177"><omgdi:waypoint x="250.0" y="129.9375468164794"></omgdi:waypoint><omgdi:waypoint x="250.0" y="190.0"></omgdi:waypoint><omgdi:waypoint x="319.99999999997794" y="190.0"></omgdi:waypoint></bpmndi:BPMNEdge></bpmndi:BPMNPlane></bpmndi:BPMNDiagram> </definitions>注:文件名為Holiday_Request.bpmn20.xml,flowable支持以BPMN和bpm
下一篇:
第2篇:Flowable啟動
https://blog.csdn.net/weixin_40816738/article/details/102875324
總結
以上是生活随笔為你收集整理的第1篇:Flowable简介的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Could not load oracl
- 下一篇: Linux Shell脚本专栏_找出占用