07-01-2011 04:07 PM
public InputStream diagram() {
// from activiti-rest
ProcessDefinitionEntity pde = (ProcessDefinitionEntity) ((RepositoryServiceImpl) engine.getRepositoryService()).getDeployedProcessDefinition(task.getProcessDefinitionId());
// the following doesn't work
//ProcessDefinitionEntity pde = (ProcessDefinitionEntity) engine.getRepositoryService().createProcessDefinitionQuery().processDefinitionId(task.getProcessDefinitionId()).singleResult();
if (pde == null || !pde.isGraphicalNotationDefined()) {
log.warn("No diagram defined for process definition id " + task.getProcessDefinitionId());
return null;
}
return ProcessDiagramGenerator.generateDiagram(pde, "png",
engine.getRuntimeService().getActiveActivityIds(task.getProcessInstanceId()));
}
Is there a better way to generate the diagram or should I raise an issue to track the required enhancement?
07-04-2011 03:28 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.