[jboss-user] [jBPM] - Re: getProcess in ProcessInstanceImpl throws a NullPointerException

Marco Rietveld do-not-reply at jboss.com
Fri Apr 5 11:05:37 EDT 2013


Marco Rietveld [https://community.jboss.org/people/marco.rietveld] created the discussion

"Re: getProcess in ProcessInstanceImpl throws a NullPointerException"

To view the discussion, visit: https://community.jboss.org/message/806737#806737

--------------------------------------------------------------
I am lucky enough to spend most of my time working on jBPM -- and it is indeed awesome!

One approach to your problem is to switch from "pass-by-value" to "pass-by-reference" for your variable assignment. In other words, instead of passing the primitive values (String, int, etc.), you can pass an object containing these values as a parameter. If you want to retrieve the values later, you simply make sure that your code keeps a reference to the object so that you can retrieve and modify the (possibly changed) values. 

This means the following: 
1. Making sure that the object used is in the classpath -- you need to put in the classpath of the application server or your war. 
2. Correctly referencing and extracting the information from your object -- whether that's in your WorkItemHandler implementation or a scriptTask.

Because of persistence, the object also needs to be serialized. Hmm.. I'll make a example of this today/tomorrow and post a link for you here.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/806737#806737]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

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


More information about the jboss-user mailing list