ruoyi前后分离版3.8.2+flowable6.7.0整合

  1. 先看看效果
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第1张图片
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第2张图片

    ruoyi前后分离版3.8.2+flowable6.7.0整合_第3张图片


    ruoyi前后分离版3.8.2+flowable6.7.0整合_第4张图片
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第5张图片
  2. 下载若依前后分离版本 https://gitee.com/y_project/RuoYi-Vue
  3. 下载ruoyi-flowable模块
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第6张图片

     

    链接:https://pan.baidu.com/s/1s0Tc5zLzUWwCgec6caIU0A 

    提取码:ruoy

  4. 解压ruoyi-flowable压缩包,把ruoyi-flowable模块复制到ruoyi项目里面
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第7张图片

  5. ruoyi项目pom.xml文件添加ruoyi-flowable引入

     ruoyi前后分离版3.8.2+flowable6.7.0整合_第8张图片

    
    
        com.ruoyi
        ruoyi-flowable
        ${ruoyi.version}
    
    
    
    
    
    ruoyi-common
  6. ruoyi-admin模块入口pom.xml引入ruoyi-flowable 
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第9张图片

    
    
        com.ruoyi
        ruoyi-flowable
    
  7. ruoyi-admin模块application.yml文件添加flowable项目文件扫描

    ,classpath*:/META-INF/modeler-mybatis-mappings/*.xml
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第10张图片
  8. ruoyi-admin模块application.yml文件添加flowable配置信息
     

    #flowable
    flowable:
      #关闭定时任务JOB
      async-executor-activate: false
      #  将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。
      database-schema-update: true
      labelFontName: 宋体
      activityFontName: 宋体
      annotationFontName: 宋体


    ruoyi前后分离版3.8.2+flowable6.7.0整合_第11张图片

  9. ruoyi-admin模块mybatis-config.xml文件添加properties配置信息用于扫描得工作流得mybatis文件

    <properties>
        <property name="blobType" value="BLOB"/>
        <property name="boolValue" value="TRUE"/>
        <property name="prefix" value=""/>
    properties>
     

    ruoyi前后分离版3.8.2+flowable6.7.0整合_第12张图片
  10. ruoyi-admin模块启动类排除flowable自动加载类
    , FlowableUiSecurityAutoConfiguration.class
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第13张图片

  11. ruoyi-framework模块security配置文件,放开flowable请求

    .antMatchers(
            HttpMethod.GET,
            "/",
            "/*.html",
            "/**/*.html",
            "/**/*.css",
            "/**/*.js",
            "/profile/**",
            "/**/*.map",
            "/**/*.woff",
            "/**/*.ttf",
            "/**/*.json",
            "/**/*.jpg",
            "/**/*.png"
    ).permitAll()
    //flowable
    .antMatchers("/app/rest/models/**").permitAll()
    .antMatchers("/rest/models/**").permitAll()
    .antMatchers("/flowable-task/**").permitAll()

    //flowable

    ruoyi前后分离版3.8.2+flowable6.7.0整合_第14张图片
  12.  运行项目
    flowable配置database-schema-update: true自动生成表(第7步)
    启动成功之后,生成对应得flowable表,关闭项目
    使用ruoyi用户表替换flowable表,替换之后重新运行

    -- 用户表

    drop VIEW if exists ACT_ID_USER;

    CREATE VIEW ACT_ID_USER AS

    SELECT

    SU.user_name AS ID_,

    1 AS REV_,

    SU.user_name AS FIRST_,

    SU.nick_name AS LAST_ ,

    '123456' AS PWD_ ,

    SU.email AS EMAIL_,

    SU.avatar AS PICTURE_ID_

    FROM SYS_USER AS SU;

    -- 分组表

    drop VIEW if exists ACT_ID_GROUP;

    CREATE VIEW ACT_ID_GROUP AS

    SELECT

    SR.role_id AS ID_ ,

    1 AS REV_,

    SR.role_name AS NAME_,

    SR.role_key as TYPE_

    FROM

    SYS_ROLE AS SR;

    -- 关系表

    drop VIEW if exists ACT_ID_MEMBERSHIP;

    CREATE VIEW ACT_ID_MEMBERSHIP AS

    SELECT

    SUR.user_id AS USER_ID_,

    SUR.role_id AS GROUP_ID_

    FROM SYS_USER_ROLE AS SUR;

  13. 解压flowable压缩包,复制到​ruoyi-ui\src\views目录下面
    ruoyi前后分离版3.8.2+flowable6.7.0整合_第15张图片​​
  14. 启动前端项目
    数据库插入菜单数据

    --flowable

    INSERT INTO `sys_menu` VALUES (2000, '流程管理', 0, 4, 'flowable', NULL, NULL, 1, 0, 'M', '0', '0', '', 'user', 'admin', '2021-10-29 16:14:27', 'admin', '2021-10-29 16:16:52', '');

    INSERT INTO `sys_menu` VALUES (2001, '流程定义', 2000, 1, 'flowable_modeler', 'flowable/modeler/index', NULL, 1, 0, 'C', '0', '0', '', 'dict', 'admin', '2021-10-29 16:15:20', 'admin', '2021-11-02 09:24:59', '');

    INSERT INTO `sys_menu` VALUES (2002, '流程任务', 2000, 2, 'flowable_task', 'flowable/task/index', NULL, 1, 0, 'C', '0', '0', '', 'build', 'admin', '2021-11-02 09:25:40', 'admin', '2021-11-02 09:25:49', '');

  15. ​​​​运行成功

 

 

 

 

 

 

 

 

 

 

 

 
  

 

你可能感兴趣的:(java)