activiti学习资料(获取流程图)
1.发布流程:
repositoryService.createDeployment()
.name("expense-process.bar")
.addClasspathResource("org/activiti/expenseProcess.bpmn20.xml")
.addClasspathResource("org/activiti/expenseProcess.png")
.deploy();
2.根据key获取流程图:
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
.processDefinitionKey("expense")
.singleResult();
String diagramResourceName = processDefinition.getDiagramResourceName();
InputStream imageStream = repositoryService.getResourceAsStream(processDefinition.getDeploymentId(), diagramResourceName);
3.如果想流程发布的时候不生成流程图,配置如下
<property name="createDiagramOnDeploy" value="false" />
http://www.mossle.com/docs/activiti/#loggingConfiguration