Camunda与SpringBoot及SpringCloud集成示例

Camunda BPM 与 Spring Boot & Spring Cloud集成示例

本示例是根据 camunda.org官网Spring Boot集成入门指引创建的。

gitee地址:https://gitee.com/skay463/camunda-spring-boot-demo

##本示例组件

1、Spring-Boot: (v2.1.1.RELEASE)

2、Camunda BPM: (v7.10.0)

3、Camunda BPM Spring Boot Starter: (v3.2.1)

4、Spring Clound: (Greenwich.RELEASE)

5、JDK: (v1.8)

6、Mysql: (v5.7)

7、其他见pom.xml

##使用步骤

1、通过 git clone https://gitee.com/skay463/camunda-spring-boot-demo.git下载本代码,然后导入Eclipse或IDEA中;

2、创建camunda_demo数据库,修改application.yml中的mysql连接配置或应用服务的端口,默认为8080;

3、通过mvn spring-boot:run 启动应用,应用启动时会自动创建数据库表并进行初始化

4、打开浏览器并访问 http://localhost:8080,使用kermit/superSecret登录Camunda Webapp,里边有Admin、Cockpit、TaskList应用,在Admin中添加用户

5、打开浏览器并访问 http://localhost:8080/swagger-ui.html,测试流程使用接口示例;

6、打开浏览器并访问 http://localhost:8080/cmaunda-swagger-ui.html,查看原生Camunda REST API;

##流程建模

1、打开浏览器并访问 http://localhost:8080/modeler.html,是WEB版流程模型编辑器示例,编辑好流程放到/src/main/resources/下,待自动重启好后,流程就可以使用了

2、PC端的请使用Camunda Modeler,创建好模型后使用工具栏最右边的按钮打开部署窗口,URL中输入:http://localhost:8080/engine-rest/engine/default/deployment/create,填写Name流程名称,和Authentication使用http basic并输入kermit/superSecret,然后执行Deploy部署流程

3、登录Cockpit查看已部署的流程

##测试接口

1、SimpleProcessHandlerImpl 是使用Java API 实现的流程操作功能

2、SimpleRestProcessHandlerImpl 使用REST API 实现的流程操作功能

##引擎配置

在/src/main/resources/META-INF/的processes.xml,为空时,默认内容如下,详细请查看Configure Process Engine in the processes.xml

<process-application
  xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <process-archive>
    <process-engine>default</process-engine>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
    </properties>
  </process-archive>
  
</process-application>

QQ交流群:650886724
码云地址:https://gitee.com/skay463/camunda-spring-boot-demo

  • 3
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值