PNG export using the API

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2013 06:16 AM
Hi forum,
we are currently trying to implement an application that returns the image file (preferably in PNG format) for a given process definition. After searching around a while I could not find any feasible approach for writing a ProcessDefinitionEntity (or BPMNModel) into an image file using the activiti API.
Is there any way to write the image file using the API? I hope so, since it is possible to export processes into PNG using the web interface and the activiti modeler.
Thanks for your help!
Michael
we are currently trying to implement an application that returns the image file (preferably in PNG format) for a given process definition. After searching around a while I could not find any feasible approach for writing a ProcessDefinitionEntity (or BPMNModel) into an image file using the activiti API.
Is there any way to write the image file using the API? I hope so, since it is possible to export processes into PNG using the web interface and the activiti modeler.
Thanks for your help!
Michael
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2013 06:25 AM
Ah. Sometimes the solution is just too clear to see it. I just found the class <code>ProcessDiagramGenerator</code> providing the method <code>generatePngDiagram</code> returning an <code>InputStream</code> and everything works fine…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2013 08:19 AM
That's the one option. (I used the same approach when I changed ProcessDiagramCanvas for crystalball https://github.com/gro-mar/activiti-crystalball/blob/master/image-builder/src/main/java/org/activiti...). This process diagram canvas allows you to write short comments into nodes, highlight nodes with different colors…)
Another option is to use SVG generator on the client side
https://github.com/Activiti/Activiti/blob/master/modules/activiti-webapp-explorer2/src/main/webapp/d...
which could be interesting too.
Another option is to use SVG generator on the client side
https://github.com/Activiti/Activiti/blob/master/modules/activiti-webapp-explorer2/src/main/webapp/d...
which could be interesting too.
