JBPM use Hibernate to write to the DB, Even if the transactin is NOT_SUPPORTED it not
write immedetly to the DB but rather wait for flush to write to the DB. In some cases the
Hibernate session of JBPM is different than the Hibernate session of the application.
Therefore if JBPM needs to write something to the DB and then there is asynchronus call in
different thread in which JBPM read from the DB, the read may be perform before the
write.
In this case there is need to flush the the two sessions before inovking the aysnchronus
call, the JBPM session and the application session.
The JBPM Hibernate session can be flushed by calling:
ctx.getJbpmContext().getSession().flush();
ctx is the execution context
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069533#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...