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.