springboot集成camunda的實現(xiàn)示例
1、說明
camunda使用Java開的工作流引擎。這里使用springboot 2.2.6.release + camunda 3.4.2
2、配置實戰(zhàn)
使用camunda流程引擎、web界面、Rest服務(wù)接口相應(yīng)依賴如下:
- 流程引擎:camunda-bpm-spring-boot-starter
- Rest服務(wù)接口:camunda-bpm-spring-boot-starter-rest
- web界面模塊:camunda-bpm-spring-boot-starter-webapp
如果僅僅是使用流程引擎,只需要引入camunda-bpm-spring-boot-starter就可以了。
(1)pom.xml文件配置
<properties>
<camunda.version>3.4.2</camunda.version>
</properties>
<!-- camunda -->
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>${camunda.version}</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>${camunda.version}</version>
</dependency>
<!-- camunda -->
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>${camunda.version}</version>
</dependency>
(2)yml文件配置
camunda:
bpm:
# 配置賬戶密碼來訪問Camunda自帶的管理界面
admin-user:
id: admin
password: admin
first-name: admin
filter:
create: All tasks
#指定數(shù)據(jù)庫類型
# database:
# type: mysql
#禁止自動部署resources下面的bpmn文件
auto-deployment-enabled: false
#禁止index跳轉(zhuǎn)到Camunda自帶的管理界面,默認true
# webapp:
# index-redirect-enabled: false
(3)啟動項目
瀏覽器輸入:http://localhost:8050/family-admin(項目的tomcat-context路徑)可以查看當(dāng)前工作流中的相關(guān)tasklist等

第一次啟動,Mysql數(shù)據(jù)庫會自動生成Camunda相關(guān)數(shù)據(jù)庫表

3、生成數(shù)據(jù)庫表說明
- ACT_RE_*:RE代表存repository。帶有此前綴的表包含“靜態(tài)”信息,例如流程定義和流程資源(圖像、規(guī)則等)。
- ACT_RU_*:RU代表runtime。這些是運行時表,包含流程實例、用戶任務(wù)、變量、作業(yè)等的運行時數(shù)據(jù)。引擎僅在流程實例執(zhí)行期間存儲運行時數(shù)據(jù),并在流程實例結(jié)束時刪除記錄。這使運行時表既小又快。
- ACT_ID_*:ID代表identity。這些表包含身份信息,例如用戶、組等。
- ACT_HI_*:HI代表history。這些是包含歷史數(shù)據(jù)的表,例如過去的流程實例、變量、任務(wù)等。
- ACT_GE_*:GE代表 general一般數(shù)據(jù),用于各種用例
到此這篇關(guān)于springboot集成camunda的實現(xiàn)示例的文章就介紹到這了,更多相關(guān)springboot集成camunda內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
詳解SpringBoot中的參數(shù)校驗(項目實戰(zhàn))
這篇文章主要介紹了SpringBoot中的參數(shù)校驗,本文通過實例代碼給大家介紹的非常詳細,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-07-07
java實現(xiàn)socket客戶端連接服務(wù)端
本文是個人剛剛開始學(xué)習(xí)如何通過socket去發(fā)送信息下邊的案例,也是書上的在這留下筆記,最后附上一個實例,有需要的小伙伴可以參考下。2015-10-10
SpringCloud中的OpenFeign調(diào)用解讀
OpenFeign是一個顯示聲明式的WebService客戶端,使用OpenFeign能讓編寫Web Service客戶端更加簡單OpenFeign的設(shè)計宗旨式簡化Java Http客戶端的開發(fā),本文給大家介紹SpringCloud之OpenFeign調(diào)用解讀,感興趣的朋友一起看看吧2023-11-11
Mybatis-plus apply函數(shù)使用場景分析
Mybatis-plus 里面的 apply方法 是用于拼接自定義的條件判斷,自定義時間查詢,根據(jù)傳進來的開始日期,查詢所有該日期是數(shù)據(jù),但是數(shù)據(jù)庫中保存是時間,所以需要使用apply查詢方式并格式化,這篇文章給大家介紹Mybatis-plus apply函數(shù)使用,感興趣的朋友一起看看吧2024-02-02
java實現(xiàn)合并2個文件中的內(nèi)容到新文件中
這篇文章主要介紹了java實現(xiàn)合并2個文件中的內(nèi)容到新文件中,思路非常不錯,這里推薦給大家。2015-03-03
SpringBoot+Mybatis使用Enum枚舉類型總是報錯No enum constant&n
這篇文章主要介紹了SpringBoot+Mybatis使用Enum枚舉類型總是報錯No enum constant XX問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-12-12

