Camunda
是一个基于 Java
的开源框架,专注于以下三个领域:
– 工作流和流程自动化(BPMN
,业务流程模型和标注)
– 案例管理(CMMN
,案例管理模型和标注)
– 决策管理(DMN
,决策模型和标注)
作为一款功能强大且灵活的流程自动化工具,Camunda
结合了 BPMN
、CMMN
和 DMN
等标准,为用户提供了统一的解决方案,帮助他们实现业务流程的优化和自动化。如果你正在寻找一款涵盖流程管理、案例管理和决策管理的工具,Camunda
是一个不错的选择。
在
ruoyi-common
模块的pom.xml
中加入以下依赖:
<!-- Camunda 工作流依赖 -->
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>7.16.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>7.16.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>7.16.0</version>
</dependency>
application.yml
中添加配置在项目的配置文件 application.yml
中添加如下 Camunda 配置:
camunda:
bpm:
admin-user:
id: admin # 设置管理员用户名
password: 123456 # 设置管理员密码
firstName: kfm
filter:
create: All tasks
在数据库连接 url
后面添加 &nullCatalogMeansCurrent=true
以确保数据库连接正确。
在
ruoyi-framework
模块下的config
包中,找到SecurityConfig.java
文件,修改权限设置,允许匿名访问 Camunda 相关路径:
.antMatchers("/login", "/register", "/captchaImage").permitAll()
.antMatchers("/app/**").permitAll()
.antMatchers("/camunda/**").permitAll()
/index
访问路径为了避免路径冲突,需注释掉原有的 /index
访问路径。
运行项目后,使用设置的管理员账户(在 application.yml
中配置的用户名和密码)登录 Camunda 管理后台。登录地址为项目的 IP 和端口号组合。
首次启动项目时,Camunda 会自动在 MySQL 数据库中创建相关的 49 张表。可以在数据库中看到这些表已成功生成。
至此,若依分离版后端框架成功集成了 Camunda7 工作流引擎。
powered by kaifamiao