cancel
Showing results for 
Search instead for 
Did you mean: 

ProcessDiagramGenerator API not available in 5.16.3

sonam
Champ in-the-making
Champ in-the-making
I am not able to locate the ProcessDiagramGenerator API in activiti-engine 5.16.3.  I have been trying to compile and run the book-rest-api from the tutorial using 5.16.3 activiti-engine.  The following is the code snipped:


if (pde != null && pde.isGraphicalNotationDefined()) {
      InputStream resource = ProcessDiagramGenerator.generateDiagram(pde, "png", ActivitiUtil.getRuntimeService().getActiveActivityIds(processInstanceId));

      InputRepresentation output = new InputRepresentation(resource);
      return output;
     
    }


-thanks
6 REPLIES 6

jbarrez
Star Contributor
Star Contributor
The diagram generator has been moved a while ago to its own module: https://github.com/Activiti/Activiti/tree/master/modules/activiti-image-generator

You'll need to add the module to your pom.xml if you want to use it.

sonam
Champ in-the-making
Champ in-the-making
I am able to get the book-rest-app working now.

thanks

aurelienpel
Champ in-the-making
Champ in-the-making
Hi

can you give the dependency you added in your pom.xml please ? because I am exactly in the same situation

Thanks a lot

Aurelien

sonam
Champ in-the-making
Champ in-the-making
Sure, I have actually documented this in my blog here https://www.blogger.com/blogger.g?blogID=6481897404924072160#editor/target=post;postID=5583531910065...

Let me know if this worked for you as well.

pravin1
Champ in-the-making
Champ in-the-making
Hi

I am using activiti 5.19.0 to learn workflow mgnt. I am trying to generate the diagram to identify the current state of the process instance. Is there any way to get the image using activiti-rest instead of using ProcessDiagramGenerator API.

i tried this API provided in Rest api doc. "runtime/process-instances/{processInstanceId}/diagram"

i am getting below error message.
{
  "message": "Bad request",
  "exception": "Process instance with id '4143' has no graphical notation defined."
}

Is there any other way or i have to use ProcessDiagramGenerator to generate the diagram to view the current state.

Thanks in Advance.! Smiley Happy

jbarrez
Star Contributor
Star Contributor
That error message means you have no graphical info in your xml, the engine does not know what to do. Probably you've created the xml b hand?

If you use the Actviiti designer of web modeler, that information will be stored in the xml.
Getting started

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.