ruoyi-vue2集成flowable6.7.2后端篇

ruoyi在中国市场有着广泛的群众基础, flowable也在很多企业落地。 本文将讲解如何在ruoyi集成flowable,主要是后端。

环境说明

ruoyi: Ruoyi-Vue2-Boot-2.x,

版本信息: 3.9.0

jdk: 1.8

flowable: 6.7.2

安装步骤

  • 在IDEA工具导入项目, 在项目名称上, 右键点击选择Module, 创建一个新的模块。ruoyi-flowable
  • maven配置
    在ruoyi项目的根目录下找到pom.xml文件, 添加flowable依赖
xml 复制代码
<properties>
<flowable.spring-boot.version>6.7.2</flowable.spring-boot.version>
<!-- 忽略其他-->
</properties>


 <dependencyManagement>
    <dependencies>
       <!--忽略其他-->
        <dependency>
            <groupId>org.flowable</groupId>
            <artifactId>flowable-spring-boot-starter</artifactId>
            <version>${flowable.spring-boot.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mybatis</groupId>
                    <artifactId>mybatis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>  
</dependencyManagement> 

在ruoyi-flowable模块下的根目录pom.xml文件加入以下依赖

xml 复制代码
<dependencies>
    <!-- swagger3-->
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-boot-starter</artifactId>
    </dependency>
    <!--common-->
    <dependency>
        <groupId>com.ruoyi</groupId>
        <artifactId>ruoyi-common</artifactId>
    </dependency>

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.40</version>
    </dependency>

    <dependency>
        <groupId>cn.hutool</groupId>
        <artifactId>hutool-all</artifactId>
        <version>5.8.40</version>
    </dependency>
    <dependency>
        <groupId>org.flowable</groupId>
        <artifactId>flowable-spring-boot-starter</artifactId>
    </dependency>
</dependencies>

继续在根pom.xml下,加入ruoyi-flowable,与ruoyi-common在同一个位置。这一步就是将新增模块嵌入了系统当中!!!

xml 复制代码
<dependency>
    <groupId>com.ruoyi</groupId>
    <artifactId>ruoyi-flowable</artifactId>
    <version>${ruoyi.version}</version>
</dependency>

在ruoyi-admin模块下加入ruoyi-flowable模块

xml 复制代码
<!-- 代码生成-->
<dependency>
    <groupId>com.ruoyi</groupId>
    <artifactId>ruoyi-generator</artifactId>
</dependency>
 <!-- flowable-->
<dependency>
    <groupId>com.ruoyi</groupId>
    <artifactId>ruoyi-flowable</artifactId>
</dependency>

配置application.yml

yaml 复制代码
flowable:
  #关闭定时任务JOB
  async-executor-activate: false
  #将databaseSchemaUpdate设置为true。当flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。
  database-schema-update: true
  # 自动部署验证设置:true-开启(默认)、false-关闭
  check-process-definitions: false
  #保存历史数据级别设置为full最高级别,便于历史数据的追溯
  history-level: full
  • 在application-druid.yml在url添加nullCatalogMeansCurrent=true
yaml 复制代码
spring:
  datasource:
    url: jdbc:mysql://<host>:<port>/<db>?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8&nullCatalogMeansCurrent=true
    username: <your_user>
    password: <your_pass>

验证Swagger是否加载

随便在ruoyi-flowable写一个controller,验证能否加载成功!

复制代码
http://localhost:8080/swagger-ui/index.html

若依工作流

若依工作流 提供开箱即用的工作流源码解决方案!

相关推荐
n 55!w !1086 小时前
MySQL数据库笔记整理1
数据库·笔记·mysql
李兆龙的博客6 小时前
从一到无穷大 #104:面向 SSD 的数据库写入设计——从 FTL 到应用协同
数据库·ssd·存储引擎
千桐科技6 小时前
qData 数据中台开源版 v1.6.4 发布:聚焦使用反馈,功能细节与产品体验持续优化
数据库·开源·qdata
fox06337 小时前
预约类平台的责任边界建模:从一个证件办理预约平台的流程设计说起
大数据·数据库·搜索引擎·全文检索·生活
John_Hui7 小时前
MySQL基础知识
数据库·sql·mysql·1024程序员节
DolphinDB7 小时前
QuantLib 之外,衍生品定价还能怎么选?DolphinDB Monte Carlo + PDE 工具实测
数据库·时序数据库·量化金融·dolphindb
泡海椒7 小时前
深度解析JQuick-SQL 逻辑计划到物理计划生成机制|分布式SQL原理
数据库·分布式·sql
恒知学术7 小时前
时间序列异常检测论文怎么查?我把 3 轮检索和筛选表写成了可复现流程
数据库·文献检索·谷歌学术
小豆庄7 小时前
视频脱敏:云端识别与本地推理的边界实测
数据库·yolo·自然语言处理·视觉检测·视频·设计规范·纹理贴图
wshzd7 小时前
LLM之Agent(120)|DeepSeek-Harness(二十七)Workflow 引擎与 Ralph 循环
前端·数据库·人工智能