天天看点

flowable 流程设计器_37、Springboot集成Flowable

工作流是OA系统不可或缺的一部分,今天介绍一款新的工作流引擎flowable。flowable 是著名 Java 工作流引擎 Activiti 的原作者从 Activiti 分支创建的新工作流引擎。flowable 是一个业务流程管理(BPM)和工作流系统,适用于开发人员和系统管理员。其核心是超快速,稳定的BPMN2流程引;易于与 Spring集成使用。

1、Flowable 设计器Flowable Designer安装

flowable 流程设计器_37、Springboot集成Flowable

下载地址:

https://blog.flowable.org/2016/11/01/flowable-eclipse-designer-5-22-0-release/
           

在线安装地址:

http://flowable.org/designer/update
           

离线安装包地址:

http://www.flowable.org/designer/archived/flowable-designer-5.22.0.zip
           
flowable 流程设计器_37、Springboot集成Flowable

2、 新建项目sc-flowable,对应的pom.xml文件如下

4.0.0com.flowable sc-flowable 0.0.1-SNAPSHOTjarsc-flowablehttp://maven.apache.orgUTF-8org.springframework.boot spring-boot-starter-parent 2.0.4.RELEASEjunit junit testorg.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-logging mysql mysql-connector-java com.zaxxer HikariCP org.flowable flowable-spring-boot-starter-basic 6.4.0org.springframework.boot spring-boot-starter-log4j2 
           

3、 新建配置文件application.yml

spring: datasource: driver-class-name : com.mysql.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/flowable?characterEncoding=UTF-8 username: root password: rootlogging: level: ROOT: infoflowable: #关闭定时任务JOB async-executor-activate: false #将databaseSchemaUpdate设置为true。当Flowable发现库与数据库表结构不一致时,会自动将数据库表结构升级至新版本。 database-schema-update: true
           

配置文件中主要配置数据库的地址、用户名及密码

4、新建springboot启动类

package com.flowable;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;@SpringBootApplicationpublic class FlowableApplication { public static void main(String[] args) { SpringApplication.run(FlowableApplication.class, args); }}
           

5、 验证是否集成flowable成功

运行后FlowableApplication.java,期间没有任何异常信息;查看数据库,已经自动生成了flowable相关的表结构

flowable 流程设计器_37、Springboot集成Flowable

继续阅读