[jboss-user] [jBPM] - Re: jBPM 5.2 set process instance variable from java - NullPointerException

Salvatore Loria do-not-reply at jboss.com
Thu May 3 11:00:10 EDT 2012


Salvatore Loria [https://community.jboss.org/people/slash17] created the discussion

"Re: jBPM 5.2 set process instance variable from java - NullPointerException"

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

--------------------------------------------------------------
I found a solution.

The problem is that I was not using transactions...

Just surround my code in a tm.begin() and tm.commit() and it works fine.

I get my tm using the jboss tm locator: 
TransactionManager tm = TransactionManagerLocator.locateTransactionManager();
tm.begin();
// get and set variables here
tm.commit();


Is this the right way to go?
--------------------------------------------------------------

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

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/20120503/8279120d/attachment.html 


More information about the jboss-user mailing list