How to get diagram image through java api


#1

with version 7.1 camunda-engine , if we need generate png image, we can use ProcessDiagramGenerator

but with version 7.9, how can we generate image with java api?


#2

Hi @fangfan,

Here is what the rest api is doing:

ProcessDefinition definition = engine.getRepositoryService().getProcessDefinition(processDefinitionId);
InputStream processDiagram = engine.getRepositoryService().getProcessDiagram(processDefinitionId); 
String fileName = definition.getDiagramResourceName();

However maybe this post will be interesting to you:

Best regards,
Yana


#3

thank you!!!