JBoss Community

NPE caused by Bitronix transaction glitch or drools transaction issue?

created by Jing Zhang in jBPM - View the full discussion

I wrote a simple java code to test jBPM5.1's JPAKnowledgeService.  I used Bitronix as transaction manager and H2 as database.

The test java code could start a process, completed a work item and then ended the process successfully, but when I added a method call

WorkflowProcessInstance.getNodeInstances().iterator().next().getNodeName() after starting the process instance, a NPE was caught.

I found it is due to ProcessInstanceImpl.kruntime is null. After traced the startProcess's execution path, found ProcessInstanceImpl.kruntime has been reset to null after transaction committed in method org.drools.persistence.SingleSessionCommandService.execute(Command<T> command).

 

Not sure if this is a Bitronix transaction issue or a jBPM5.1 transaction issue.

Reply to this message by going to Community

Start a new discussion in jBPM at Community