[jboss-user] [jBPM] - Process Instance Variable within WorkItemHandler

Amin MC do-not-reply at jboss.com
Tue Apr 26 14:34:11 EDT 2011

Amin MC [http://community.jboss.org/people/aminmc] created the discussion

"Process Instance Variable within WorkItemHandler"

To view the discussion, visit: http://community.jboss.org/message/602066#602066


I have a custom work item handler and I would like to load the value of a process instance variable while executing the work item handler.  Basically I have a service method which does the following:

public String getValue(Long processId, String variableName) {


  //do something with the value...but not modify


When i call this service method within the execute method of the work item handler I get a nullpointerexception and the stacktrace indicates that the processinstancebytearray value of ProcessInstanceInfo is null. I guess this is because the process has not reached a safe point to persist.  Is there another way to get the value of a variable defined in the process within the execution of the work item handler?

This is the final part of a POC I am currently working on demonstrating the use of JBPM 5 so any help on this would be extremely grateful.


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110426/b797f7ea/attachment.html 

More information about the jboss-user mailing list