1.通过流程定义对象获取流程定义资源,获取 bpmn 和 png
@Test
public void getProcessResource() {
// 流程定义id
String processDefinitionId = "holiday:1:10004";
// 获取repositoryService
RepositoryService repositoryService = processEngine
.getRepositoryService();
//创建流程定义对象
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
.processDefinitionId(processDefinitionId).singleResult();
String resource_bpmn = processDefinition.getResourceName();
String resource_png = processDefinition.getDiagramResourceName();
System.out.println("resource_bpmn = " + resource_bpmn);
System.out.println("resource_png = " + resource_png);
}