springboot+camunda實現(xiàn)工作流的流程分析
1.在camunda modeler工具里面寫流程,任務(wù)執(zhí)行指明Java類

2.保存文件放在resources目錄下,并建立一個processes.xml的空文件

3.依賴配置
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- camunda依賴 -->
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
4.yml配置:建立一個空數(shù)據(jù)庫既可以,運行后會自動建表
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/camunda
username: root
password: root
camunda:
bpm:
admin-user:
id: admin
password: admin
first-name: admin
filter:
create: All tasks
#指定數(shù)據(jù)庫類型
database:
type: mysql
#自動部署resources下面的bpmn文件
auto-deployment-enabled: true
#禁止index跳轉(zhuǎn)到Camunda自帶的管理界面,默認true
# webapp:
# index-redirect-enabled: false
5.編寫任務(wù)中的Java執(zhí)行類
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/camunda
username: root
password: root
camunda:
bpm:
admin-user:
id: admin
password: admin
first-name: admin
filter:
create: All tasks
#指定數(shù)據(jù)庫類型
database:
type: mysql
#自動部署resources下面的bpmn文件
auto-deployment-enabled: true
#禁止index跳轉(zhuǎn)到Camunda自帶的管理界面,默認true
# webapp:
# index-redirect-enabled: false
6.登錄執(zhí)行,點擊tasklist,



7.結(jié)果:已經(jīng)成功執(zhí)行任務(wù)

到此這篇關(guān)于springboot+camunda實現(xiàn)工作流的文章就介紹到這了,更多相關(guān)springboot camunda 工作流內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
聊聊Spring循環(huán)依賴三級緩存是否可以減少為二級緩存的情況
這篇文章主要介紹了聊聊Spring循環(huán)依賴三級緩存是否可以減少為二級緩存的情況,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2021-02-02
Javaweb使用cors完成跨域ajax數(shù)據(jù)交互
本文由跨域、cors的概念開始,進而向大家介紹了Javaweb使用cors完成跨域ajax數(shù)據(jù)交互的相關(guān)內(nèi)容,需要的朋友可以了解下。2017-09-09
java基礎(chǔ)(System.err和System.out)詳解
下面小編就為大家?guī)硪黄猨ava基礎(chǔ)(System.err和System.out)詳解。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-06-06
pom.xml中解決Provides?transitive?vulnerable?dependency?mave
這篇文章主要介紹了在pom.xml中如何解決Provides?transitive?vulnerable?dependency?maven:org.yaml:snakeyaml:1.33警告問題,需要的朋友可以參考下2023-06-06

