下载地址

https://camunda.com/download/modeler/

工具说明

image.png
image.png

服务类

image.png

获取

RepositoryService repositoryService = processEngine.getRepositoryService();

image.png

image.png
image.png
image.png

资源部署的步骤

image.png

API

部署

  1. @Test
  2. public void create(){
  3. Deployment deployment = repositoryService.createDeployment()
  4. .name("郭剑锋的请假流程")
  5. .source("本地测试")
  6. .tenantId("A")
  7. .addClasspathResource("com/gjf/chp8/leave.bpmn")
  8. // .nameFromDeployment("1901") //存在不添加
  9. .deploy();
  10. System.out.println(deployment);
  11. }

image.png

命令执行器初始化及部署方式

image.png

image.png

classpath方式

image.png
image.png
image.png

文本部署

image.png

image.png

流方式部署

image.png
image.png

压缩流

支持png,bpmn,表单文件,等等

image.png

已部署资源再次部署

  1. @Test
  2. public void deploy1(){
  3. Deployment deployment = repositoryService.createDeployment()
  4. .name("郭剑锋的请假流程")
  5. .source("本地测试")
  6. .tenantId("A")
  7. .addDeploymentResourceByName("2001","leave.bpmn")
  8. // .addDeploymentResourceById()
  9. // .addDeploymentResources()
  10. // .addDeploymentResourcesByName()
  11. .deploy();
  12. System.out.println(deployment);
  13. }