目标
- 初试 Camunda 流程引擎
知识点
- camunda 开源 github 下载地址:https://github.com/camunda/camunda-bpm-platform
- 使用 camunda 开源工作流引擎有:通过 docker 运行、使用 springboot 集成、部署 camunda 发行包、基于源代码编译运行等多种方式
- 官方 springboot 和 camunda 版本依赖关系:https://docs.camunda.org/manual/7.19/user-guide/spring-boot-integration/version-compatibility/
- 调用流程引擎服务有三种方式:
- 通过 Camunda Web 控制台界面
- 通过官方 rest 接口操作 camunda 流程引擎,Camunda Platform REST API 官方说明文档:Camunda Platform REST API
- Java 代码调用 Camunda 提供的 Service 接口(如:org.camunda.bpm.engine.RuntimeService、org.camunda.bpm.engine.TaskService 等等)
流程设计器
- 可以使用 camunda 流程设计器设计一个 BPMN2 的业务流程,并部署流程
- 官网下载:https://camunda.com/download/modeler(下载文件如:camunda-modeler-5.29.0-win-x64.zip)
- 下载流程设计器 camunda-modeler 后,只需将下载内容解压缩即可使用,运行 Camunda Modeler.exe,启动流程建模器。
通过 springboot 继承 camunda
- 示例源码见 https://gitee.com/alfredinchange/springboot.git 下 com.alfred.springboot.camunda
- 运行 application 后,在浏览器中打开 http://localhost:8080,密码:admin / 123456
- 可以通过 yml 配置自动创建表(共 49 张),也可以手动创建(执行的 sql 脚本路径在源码路径:camunda-bpm-platform-7.19.0\engine\src\main\resources\org\camunda\bpm\engine\db\create)