工作流activity_开源、强大的工作流引擎:camunda入门介绍
簡(jiǎn)介
Camunda is a Java-based framework supporting BPMN for workflow and process automation, CMMN for Case Management and DMN for Business Decision Management.
重要概念
- BPMN - Business Process Model and Notation (BPMN) is a standard for Workflow and Process Automation. Camunda supports the 2.0 version of BPMN.
- https://docs.camunda.org/get-started/bpmn20/
- CMMN - Case Management Model and Notation (CMMN) is a standard for Case Management. Camunda supports the 1.1 version of CMMN.
- https://docs.camunda.org/get-started/cmmn11/
- DMN - Decision Model and Notation (DMN) is a standard for Business Decision Management. Camunda supports the 1.1 version of DMN.
- https://docs.camunda.org/get-started/dmn11/
工作流對(duì)比
關(guān)鍵人物介紹
Tom Baeyens - 創(chuàng)建了jbpm。離開(kāi)JBoss后,jBPM的下一個(gè)版本jBPM5完全放棄了jBPM4的基礎(chǔ)代碼,基于Drools Flow重頭來(lái)過(guò),目前官網(wǎng)已經(jīng)推出了jBPM6的beta版本;Tom Baeyens加入Alfresco后很快推出了新的基于jBPM4的開(kāi)源工作流系統(tǒng)Activiti。2012年末,Alfresco的Activity BPM 小組正經(jīng)歷一系列的轉(zhuǎn)變:Tom Baeyens將不再領(lǐng)導(dǎo)Activity工程,決定離開(kāi)Alfresco。camunda是Activity最大的貢獻(xiàn)者之一(除Alfresco以外),同時(shí)也是它一個(gè)主要的執(zhí)行咨詢(xún)合作伙伴。camunda表示Activity可能太拘束于Alfresco對(duì)以文檔為中心的工作流的需求,而忽視了Activity起步時(shí)的更為普遍的BPM平臺(tái),故而從Activiti分支建立了camunda BPM項(xiàng)目。
框架總覽
流程引擎架構(gòu)
框架示例
Camunda Tomcat 集成容器下載:
- https://camunda.org/download/
解壓tomcat,切換到目錄serverapache-tomcat-8.0.24webapps,包含以下子目錄:
?Camunda -- 管理功能模塊,包含admin、cockpit、tasklist
?camunda-invoice – 發(fā)票審批demo
?engine-rest – 工作流程引擎Rest API模塊
?Examples – 其他demo例子
數(shù)據(jù)庫(kù)創(chuàng)建:
切換目錄sqlcreate選擇對(duì)應(yīng)sql腳本執(zhí)行
tomcat配置修改:
切換到serverapache-tomcat-8.0.24conf目錄
bpm-platform.xml
camunda自有配置維護(hù)文件。
可根據(jù)具體應(yīng)用場(chǎng)景修改以下全局配置屬性
full
true
true
true
true
tomcat配置修改:
切換到serverapache-tomcat-8.0.24conf目錄
server.xml
tomcat容器管理配置維護(hù)文件。
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
uniqueResourceName="process-engine"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@127.0.0.1:1521:camunda"
defaultTransactionIsolation="READ_COMMITTED"
username="camunda"
password="123456"
maxActive="20"
minIdle="5"
removeAbandoned="true"
removeAbandonedTimeout="60"
testOnBorrow="true"
validationQuery="select count(1) from dual"
logAbandoned="true"/>
應(yīng)用集成
添加依賴(lài)包
compile 'org.camunda.bpm:camunda-engine:7.7.0'
compile 'org.camunda.bpm:camunda-engine-spring:7.7.0'
添加spring bean
modeler流程文件
將modeler設(shè)計(jì)流程模板放到應(yīng)用工程resources目錄或者子目錄下。
用戶(hù)集成方式
Camunda自有user體系
優(yōu):無(wú)需改動(dòng)
缺:靈活性差,運(yùn)維成本高
使用ldap用戶(hù)集成
優(yōu):可和支持ldap功能對(duì)接
缺:依賴(lài)ldap功能限制
通過(guò)插件擴(kuò)展用戶(hù)體系
優(yōu):通過(guò)擴(kuò)展能實(shí)現(xiàn)定制化需求
缺:對(duì)camunda熟悉,開(kāi)發(fā)成本高
只使用workflow節(jié)點(diǎn)流轉(zhuǎn)功能
優(yōu):應(yīng)用靈活,可滿(mǎn)足不同業(yè)務(wù)需求
缺:camunda部分豐富功能無(wú)法使用,可能重新開(kāi)發(fā)框架存在組件
Job Executor
文檔地址:https://docs.camunda.org/manual/7.7/user-guide/process-engine/the-job-executor/
Job 激活配置:
job 工作架構(gòu):
同構(gòu)集群部署:
異構(gòu)集群部署:
支持異構(gòu)集群部署,部署node設(shè)置jobExecutorDeploymentAware=true
true
附錄
- engine-rest api
- https://docs.camunda.org/manual/7.7/reference/rest/
- Web modeler
- http://bpmn.io/toolkit/bpmn-js/walkthrough/
- camunda get-started
- https://docs.camunda.org/get-started/
- Camunda Guid
- https://docs.camunda.org/manual/7.7/introduction/
- LDAP Identity Service
- https://docs.camunda.org/manual/7.7/user-guide/process-engine/identity-service/
總結(jié)
以上是生活随笔為你收集整理的工作流activity_开源、强大的工作流引擎:camunda入门介绍的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: onclick=两个函数_[译]Reac
- 下一篇: 拦截锚点修改url_浅谈URL跳转与We