protected String deploymentProcessDefinitionFromUIModelId(String modelId) throws Exception{
Model model = modelService.getModel(modelId);
BpmnModel bpmnModel = modelService.getBpmnModel(model);
Deployment deployment = repositoryService.createDeployment()
.name(model.getName())
.addBpmnModel(model.getKey() + ".bpmn", bpmnModel).deploy();
return deployment.getId();
}
protected String deploymentProcessDefinitionFromClasspath(String name, String xmlpath, String pngpath){
DeploymentBuilder deploymentBuilder = repositoryService.createDeployment();
deploymentBuilder.name(name);
deploymentBuilder.addClasspathResource(xmlpath);
deploymentBuilder.addClasspathResource(pngpath);
Deployment deployment = deploymentBuilder.deploy();
return deployment.getId();
}
本作品採用《CC 協議》,轉載必須註明作者和本文連結