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

2.保存文件放在resources目錄下,并建立一個(gè)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配置:建立一個(gè)空數(shù)據(jù)庫(kù)既可以,運(yùn)行后會(huì)自動(dòng)建表
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ù)庫(kù)類型
database:
type: mysql
#自動(dòng)部署resources下面的bpmn文件
auto-deployment-enabled: true
#禁止index跳轉(zhuǎn)到Camunda自帶的管理界面,默認(rèn)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ù)庫(kù)類型
database:
type: mysql
#自動(dòng)部署resources下面的bpmn文件
auto-deployment-enabled: true
#禁止index跳轉(zhuǎn)到Camunda自帶的管理界面,默認(rèn)true
# webapp:
# index-redirect-enabled: false
6.登錄執(zhí)行,點(diǎn)擊tasklist,



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

到此這篇關(guān)于springboot+camunda實(shí)現(xiàn)工作流的文章就介紹到這了,更多相關(guān)springboot camunda 工作流內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
spring boot使用logback日志級(jí)別打印控制操作
這篇文章主要介紹了spring boot使用logback日志級(jí)別打印控制操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧2021-03-03
myBatis組件教程之緩存的實(shí)現(xiàn)與使用
這篇文章主要給大家介紹了關(guān)于myBatis組件教程之緩存的實(shí)現(xiàn)與使用的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-11-11
選擇Spring Boot項(xiàng)目的內(nèi)嵌容器的理由
Spring Boot是由Pivotal團(tuán)隊(duì)提供的全新框架,其設(shè)計(jì)目的是用來簡(jiǎn)化新Spring應(yīng)用的初始搭建以及開發(fā)過程。這篇文章主要介紹了選擇Spring Boot項(xiàng)目的內(nèi)嵌容器,需要的朋友可以參考下2017-11-11
SpringMvc實(shí)現(xiàn)簡(jiǎn)易計(jì)算器功能
這篇文章主要為大家詳細(xì)介紹了SpringMvc實(shí)現(xiàn)簡(jiǎn)易計(jì)算器功能,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-07-07
SpringBoot實(shí)現(xiàn)統(tǒng)一功能處理的教程詳解
這篇文章主要為大家詳細(xì)介紹了SpringBoot如何實(shí)現(xiàn)統(tǒng)一功能處理,文中的示例代碼講解詳細(xì),對(duì)大家學(xué)習(xí)或工作有一定借鑒價(jià)值,感興趣的同學(xué)可以參考閱讀下2023-05-05
Java實(shí)現(xiàn)酒店客房管理系統(tǒng)
這篇文章主要為大家詳細(xì)介紹了Java實(shí)現(xiàn)酒店客房管理系統(tǒng),文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2019-02-02
Java 微信公眾號(hào)開發(fā)相關(guān)總結(jié)
公眾號(hào)作為主流的自媒體平臺(tái),有著不少人使用。這次以文本回復(fù)作為案例來講解Java相關(guān)的微信公眾號(hào)開發(fā)2021-05-05
java如何實(shí)現(xiàn)獲取客戶端ip地址的示例代碼
本文主要介紹了java如何實(shí)現(xiàn)獲取客戶端ip地址,主要包括java獲取客戶端ip地址工具類使用實(shí)例、應(yīng)用技巧,文中通過示例代碼介紹的非常詳細(xì),感興趣的小伙伴們可以參考一下2022-04-04

