[jboss-user] [JBoss jBPM] - Re: How to get process jpg and gpd

Olivier.ch do-not-reply at jboss.com
Thu Nov 8 08:47:21 EST 2007


I have tryed your solution but when I get the FileDefinition, this object is null...
Is there something to do when you deploy your process to be able to get this image ... ?

my code to get this FileDefinition is :


  | 
  | JbpmContext context = Jbpmconfiguration.createJbpmContext();
  | 	
  | ProcessInstance pi = context.loadProcessInstance(idProcess);
  | 	
  | ProcessDefinition processDefinition = context.getGraphSession().loadProcessDefinition(pi.getProcessDefinition().getId());
  | 	
  | FileDefinition fileDefinition = processDefinition.getFileDefinition();
  | byte[] bytes = fileDefinition.getBytes("processimage.jpg");
  | 
  | 

I get a nullPointerException on the last line, of course my fileDefinition is null ... why ?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102896#4102896

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102896



More information about the jboss-user mailing list