cancel
Showing results for 
Search instead for 
Did you mean: 

BPMN 2.0 diagram

mhdshahdoost
Champ in-the-making
Champ in-the-making
hi

i need to Activiti API that generate new picture [png file] from current state of each process Instance on DB.and mark current state with red color on
diagram. is there anything for this work ?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
Activiti has this functionality built-in (condition is that the process-definition contains DI-information), look at this extract of ProcessDefinitionImageStreamBuilder (explorer 2):

ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(processInstance
            .getProcessDefinitionId());

    if (processDefinition != null && processDefinition.isGraphicalNotationDefined()) {
      InputStream definitionImageStream = ProcessDiagramGenerator.generateDiagram(processDefinition, "png",
        runtimeService.getActiveActivityIds(processInstance.getId()));