JBoss Community

Re: jPBM 5.1, persistent processes get finished without regard to session

created by Miljenko Norsic in jBPM - View the full discussion

Hi,

 

I have made a small application to compare persistent and non-persistent processes and event signaling, and it it is obvious that they do not have the same behaviour, even if used on the same code.

 

Please see attached Eclipse project (you have to add reference to BTM and H2 database driver to make it work, and run "ant start.h2" to run H2 database instance if you use pre-conifigured jBPM5 demo).

In non-persistent scenario (ProcessTestNonPersistent), calling signalEvent on ksession correctly sends signal to process instances for that particular ksession.

At the same time, persistent scenario (ProcessTestPersistent) fails down with a NullPointerException:

 

java.lang.NullPointerException

at org.jbpm.process.instance.impl.ProcessInstanceImpl.setProcess(ProcessInstanceImpl.java:61)

at org.jbpm.marshalling.impl.AbstractProcessInstanceMarshaller.readProcessInstance(AbstractProcessInstanceMarshaller.java:380)

at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:133)

at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:64)

 

I think both scenarios should behave the same way, regardless of applied persistence strategy.

 

Thanks,

Miljenko

Reply to this message by going to Community

Start a new discussion in jBPM at Community