Hi,
I have a very strange issue with the new JBPM 5.2 (with JPA persistence activated). In processes that end in the same call used to start the process (for instance a process with only script task). In these case, indeed, I have this NPE:
java.lang.NullPointerException
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:172)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1079)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:306)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:119)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:38)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:345)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
Debugging the JBPM code, it seems that in org.jbpm.process.instance.ProcessRuntimeImpl, when the process is started (and -subsequentially- ended), the Session reference goes to null (and then the NPE is thrown).
The very same process definitions work well with JBPM 5.1
It's a regression?