We too use forks, joins and sub proceses extensively with async nodes.
StaleObjectExecption have been in issue for us with JBPM 3.2.2.
Our problem isn't in the fork, but the join that follows.
In November a fix was made to Join.java where they added a flush. I pulled a copy of this
file into our code base. There is a Jira issue for this. Tom Baeyens checked in the code
in November. But I can't find the issue number. If you look at the CVS history for
Join.java you should see the change.
This significantly helped elimate the most of our StaleObjectExceptions. We would get a
StaleObjectException frequently when two or more async sub-processes finished and both
their next transitions were into the same Join node.
We just discovered another issue with Join and StaleObjectExcption. If two or more of the
transitions coming into the join are executed at the same time so the Join.execute method
is called by multiple threads simultaneously. Each thread tries to updated the parent
token and a StaleObjectException results. We are trying to create a unit test that
reliable produces the problem. At the moment it is a race condition so it doesn't
happen everytime.
Hope this helps.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4131529#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...