repositoryService.getProcessDiagram(processDefinitionId) - not image generated

324 views
Skip to first unread message

Markus Schulz

unread,
Oct 30, 2013, 1:48:53 PM10/30/13
to camunda-...@googlegroups.com
hello,

i want to show the process image on my own tasklist, but the repository function
getProcessDiagram(processDefinitionId) always returns NULL instead of an InputStream.

for example the following loop:

List<ProcessDefinition> processDefinitions =
repositoryService.createProcessDefinitionQuery().latestVersion().active().list();
for (ProcessDefinition def : processDefinitions) {
InputStream inputStream = repositoryService.getProcessDiagram(def.getId());
if (inputStream == null) continue;
log.info("We got an image!");
}

will always return null.

whats wrong here?
I'm use camunda 7.0.0 with CDI-integration.
On the camunda cockpit and tasklist i can see the process images for my processes.
Therefore the bpmn model seems to be correct (has a valid bpmni section).

regards
msc

Bernd Rücker (camunda)

unread,
Oct 30, 2013, 2:15:41 PM10/30/13
to camunda-...@googlegroups.com

Hi Markus.

 

Is the PNG image part of your deployment? This is important if you want to use the PNG approach (instead of the JavaScript rendering we use in tasklist/cockpit). See http://docs.camunda.org/latest/guides/user-guide/#process-engine-process-diagram-visualization.

 

Cheers

Bernd

--
You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/356063cb-abeb-47de-a3e7-ea0aa74ca1ad%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Markus Schulz

unread,
Nov 1, 2013, 6:16:03 AM11/1/13
to camunda-...@googlegroups.com
hello Bernd,


Am Mittwoch, 30. Oktober 2013 19:15:41 UTC+1 schrieb Bernd Rücker:

Hi Markus.

 

Is the PNG image part of your deployment? This is important if you want to use the PNG approach (instead of the JavaScript rendering we use in tasklist/cockpit). See http://docs.camunda.org/latest/guides/user-guide/#process-engine-process-diagram-visualization.


no, it's not.
then this is my problem. 
i thought that the getProcessDiagram() function is responsible to render the image.
i deploy my bpmn processes from java like:

IAlcoDataSource ds = alcoSession.getServiceRegistry().getFileService().readFile(res.getAbsolutePath());
Deployment deployment = repositoryService.createDeployment(ejbProcessApplication.getReference())
  .addInputStream(res.getDisplayName(), ds.getInputStream())
  .deploy();

the datasource contains the bpmn file.
can i deploy the image through the same way?

regards
msc

Bernd Rücker (camunda)

unread,
Nov 1, 2013, 8:36:12 AM11/1/13
to camunda-...@googlegroups.com

Hi Markus.

 

Yes – you can add the PNG image with „addInputStream” – it has to have the same name as the bpmn file (just .png instead of .bpmn of course).

 

We render only via JS – there is a deprecated server side PNG rendering – but it is pretty limited and does not work in every java environment – so I would highly recommend not to use it (that’s why we do not support or document it ;-)).

 

Cheers

Bernd

--

You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.

Markus Schulz

unread,
Nov 5, 2013, 3:28:43 AM11/5/13
to camunda-...@googlegroups.com
hi Bernd,


Am Freitag, 1. November 2013 13:36:12 UTC+1 schrieb Bernd Rücker:

Hi Markus.

 

Yes – you can add the PNG image with „addInputStream” – it has to have the same name as the bpmn file (just .png instead of .bpmn of course).


thanks. it works.
 

 

We render only via JS – there is a deprecated server side PNG rendering – but it is pretty limited and does not work in every java environment – so I would highly recommend not to use it (that’s why we do not support or document it ;-)).



i have a process where the cockpit can't generate the image (it's always blank). Looks like a bug in the javascript rendering. 
Where can i submit an error ticket without publish the process to everyone?

 

Bernd Rücker (camunda)

unread,
Nov 5, 2013, 3:50:28 AM11/5/13
to camunda-...@googlegroups.com

Hi Markus.

 

The way to keep issues / bug reports private is via our support with a valid EE subscription – worth to check anyway ;-) http://www.camunda.com/fox/product/community-vs-enterprise/

 

You could use camunda share as well: http://camunda.org/share/. Check “anonymize process model” and labels and such should be removed. Maybe that is sufficient to make it sharable in our public JIRA?

 

But be aware that the anonymzer is still limited – so check the XML before posting if it is anonymous enough. If not you can send that link privately to me and I will take care (as I like to help people which use camunda share :-)) – and then I could as well take the feedback for the anonymzer. How do you like that idea?

 

By the way – if this is a bug in the JavaScript renderer – the same problem should exist in camunda share…

 

Cheers

Bernd

 

Von: camunda-...@googlegroups.com [mailto:camunda-...@googlegroups.com] Im Auftrag von Markus Schulz
Gesendet: Dienstag, 5. November 2013 09:29
An: camunda-...@googlegroups.com
Betreff: Re: [camunda-bpm-users] repositoryService.getProcessDiagram(processDefinitionId) - not image generated

 

hi Bernd,

--

You received this message because you are subscribed to the Google Groups "camunda BPM users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camunda-bpm-us...@googlegroups.com.
To post to this group, send email to camunda-...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages