Kong

当机立断,非黑即白,不要后悔

Enjoy programming and build awesome stuff.
Silence makes big money.
Life's most persistent and urgent question is, "What are you doing for others?"


Springboot集成camunda工作流引擎

版本对照:

|Spring Boot starter|Camunda 7 版本|Spring Boot 版本| |-|-|-| |1.0.0* |7.3.0 |1.2.5.RELEASE| |1.1.0* |7.4.0 |1.3.1.RELEASE| |1.2.0* |7.5.0 |1.3.5.RELEASE| |1.2.1* |7.5.0 |1.3.6.RELEASE| |1.3.0* |7.5.0 |1.3.7.RELEASE| |2.0.0** |7.6.0 |1.4.2.RELEASE| |2.1.x** |7.6.0 |1.5.3.RELEASE| |2.2.x** |7.7.0 |1.5.6.RELEASE| |2.3.x |7.8.0 |1.5.8.RELEASE| |3.0.x |7.9.0 |2.0.x.RELEASE| |3.1.x |7.10.0 |2.0.x.RELEASE| |3.2.x |7.10.0 |2.1.x.RELEASE| |3.3.1+ |7.11.0 |2.1.x.RELEASE| |3.4.x |7.12.0 |2.2.x.RELEASE| image.png

pom.xml

 <!-- 工作流相关 -->
        <dependency>
            <groupId>org.camunda.bpm.springboot</groupId>
            <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
            <version>${camunda.spring-boot.version}</version>
        </dependency>
        <dependency>
            <groupId>org.camunda.bpm.springboot</groupId>
            <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
            <version>${camunda.spring-boot.version}</version>
        </dependency>

yaml配置

# Camunda配置
camunda:
    bpm:
        webapp:
            application-path: /workflow #Camunda web端管理
        database:
            type:  mysql
            schema-update: true
        filter:
            create: All tasks
        auto-deployment-enabled: true # 自动部署 resources 下的 bpmn文件
        deployment-resource-pattern: classpath*:bpm/*.bpmn
        admin-user:
            id: admin
            password: ktadmin

启动项目后,Camunda会自动在数据库中初始化建表。

更早的文章

工作流技术选型分析

1. 名词解释#1.1. BPMBusiness Process Management,业务流程管理,“通过建模、自动化、管理和优化流程,打破跨部门跨系统业务过程依赖,提高业务效率和效果”。1.2. BPMNBusiness Process Modeling Notation,业务流程建模与标注,包括这些图元如何组合成一个业务流程图(Business Process Diagram);讨论BPMN的各种的用途,包括以何种精度来影响一个流程图中的模型;BPMN作为一个标准的价值,以及BPMN...…

继续阅读