...Sorry, I miskeyed and posted my last post prematurely.
Re recursive execution:
I can't really point at a specific "this test fails"... it's more that
it's a likely source of bugs due to incorrect analysis, both for JBPM developers and
JBPM users.
For example, an actionhandler might be incorrectly written:
acquireSomeResource()
| try
| {
| useTheResource();
| leaveNode();
| }
| finally
| {
| releaseSomeResource()
| }
|
Can you spot the bug?
The release is happening after all subsequent nodes that can be executed are executed. If
any of them needed the same resource, they would be surprised to find that it was already
in use. Billy Pilgrim would be at home ;-).
Less importantly, recursive evaluation causes resources to be tied up unnecessarily.
I've seen posts on this forum complaining about a "memory leak in JBPM" -
they perform a process loop a zillion times and watch the heap grow without bound. This
would be silly as a production scenario, but it's a very typical kind of test to run.
The fix is to raise a flag in the token while a node's executionHandler is being
performed, so that any internal leaveNode() or signal() calls know that they are being
performed within this context. If an actionHandler performs a leaveNode or signal, the
transition to take is recorded, but not actually taken until after the actionHandler
exits.
-Ed Staub
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069653#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...