How to get diagram image through java api

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?

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,

1 Like

thank you!!!