Spring cloud工作流Springboot

Spring Boot 2.x整合Activiti工作流以及模型

2019-04-25  本文已影响468人  Exrick

集成Activiti 5.22,考虑到文档资料较多未选用新版本(模型设计器改动较大)或Flowable

整合Activiti 5.22

<!-- Activiti -->
<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-spring-boot-starter-basic</artifactId>
    <version>5.22.0</version>
    <exclusions>
        <exclusion>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<!-- Activiti流程图 -->
<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-diagram-rest</artifactId>
    <version>5.22.0</version>
</dependency>
<!-- Activiti在线设计 -->
<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-modeler</artifactId>
    <version>5.22.0</version>
</dependency>
// Activiti5.22需要排除Security
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
public class XbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(XbootApplication.class, args);
    }
}
# 工作流
spring:
    activiti:
      check-process-definitions: false
      db-identity-used: true
      # 自动生成Activiti相关表 第一次生成后建议关闭提高运行速度
      database-schema-update: true
      # 保存历史数据级别设置为full最高级别,便于历史数据的追溯
      history-level: full

整合模型设计器

image image
ACTIVITI.CONFIG = {'contextRoot' : '/xboot/act', };
public void saveModel(@PathVariable String modelId,
                      @RequestParam String name, @RequestParam String description,
                      @RequestParam String json_xml, @RequestParam String svg_xml)
image
上一篇下一篇

猜你喜欢

热点阅读