JBoss Community

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

created by Salvatore Loria in jBPM - View the full discussion

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

Start a new discussion in jBPM at Community