下载地址
工具说明
服务类
获取
RepositoryService repositoryService = processEngine.getRepositoryService();
资源部署的步骤
API
部署
@Test
public void create(){
Deployment deployment = repositoryService.createDeployment()
.name("郭剑锋的请假流程")
.source("本地测试")
.tenantId("A")
.addClasspathResource("com/gjf/chp8/leave.bpmn")
// .nameFromDeployment("1901") //存在不添加
.deploy();
System.out.println(deployment);
}
命令执行器初始化及部署方式
classpath方式
文本部署
流方式部署
压缩流
支持png,bpmn,表单文件,等等
已部署资源再次部署
@Test
public void deploy1(){
Deployment deployment = repositoryService.createDeployment()
.name("郭剑锋的请假流程")
.source("本地测试")
.tenantId("A")
.addDeploymentResourceByName("2001","leave.bpmn")
// .addDeploymentResourceById()
// .addDeploymentResources()
// .addDeploymentResourcesByName()
.deploy();
System.out.println(deployment);
}