wwitt
January 25, 2020, 6:25am
2
For default configurations, there is an image generated when the process is deployed. You can fetch this from the database or pull it out programmatically:
If the process was deployed to the engine, there is an image resource already present in the system. The following code will get the latest version of “lamdaProcess” and write it to a file called “processImage.png”:
ProcessDefinition process = repositoryService.createProcessDefinitionQuery().processDefinitionKey("lamdaProcess").latestVersion().singleResult();
InputStream stream = repositoryService.getResourceAsStream(process.getDeploymentId(), process.getDiagramResourceName());
File targetFil…