[jboss-user] [jBPM] New message: "Re: Generate Image from ProcessDefinition"

Sriraman Gopalan do-not-reply at jboss.com
Wed Mar 10 02:50:13 EST 2010

User development,

A new message was posted in the thread "Generate Image from ProcessDefinition":


Author  : Sriraman Gopalan
Profile : http://community.jboss.org/people/sreeraaman

Hi All,
I am not sure if this is what you are looking at. Assuming that you designed the process using the GPD eclipse plugin, after deployment of the process (.par archive), you can get the image of the process as a byte[] as shown below:
public byte[] getProcessDiagram(Long processDefinitionId) {
        byte[] returnValue = null;
        JbpmContext context = getJbpmContext();
            GraphSession graphSession = context.getGraphSession();
            ProcessDefinition processDefinition = graphSession.getProcessDefinition(processDefinitionId);
            FileDefinition fileDefinition = processDefinition.getFileDefinition();
            returnValue = fileDefinition.getBytes("processimage.jpg");
        catch(Exception e){
        return returnValue;
Form the returning byte[] you can manipulate the image as desired. This is as of JBPM 3.2.3.


To reply to this message visit the message page: http://community.jboss.org/message/530961#530961

More information about the jboss-user mailing list