[rules-users] Flow exception handling

Swindells, Thomas TSwindells at nds.com
Tue Jun 8 11:58:43 EDT 2010


Hi Everyone,

I'm trying to get my head round how to use Drools Flow in a reliable manner.
In particular I'm trying to understand how to defensively program against exceptions thrown within Action Nodes (eg NullPointerException).

In 5.0.1 it is absolutely horrendous as if the action throws an exception while being called from fireUntilHalt then the exception just gets swallowed up with no way for the application to detect it at all.

In 5.1.0-M1 it is marginally better in that the exception is thrown through fireUntilHalt (or whatever other location it is called from).
However there seems to be absolutely no way to determine which process is at fault - the process isn't even marked as Aborted and still exists in the session, also if you call fireUntilHalt again it just seems to sit there and not run any more processes. It doesn't even throw an IllegalState type exception to tell you it isn't valid to call it after an exception has occurred.

What I was expecting was that processes work in a similar way to java threads.  If a particular process encounters an exception I would expect that:

1.       The process is marked as aborted.

2.       An appropriate method on a process event listener is called.

3.       Any other processes in the session will attempt to continue to run.

Clearly depending on your session configuration the working memory may be in an invalid state and other processes may be stuck waiting for an event to occur which never will, but this is a design decision for the application developer, in many other cases processes will be stand alone keeping all their data internal to themselves.

Is there some other functionality of Drools that I am missing or should I raise a JIRA for this (if one doesn't already exist).

Thomas

________________________________

**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100608/1fc33825/attachment.html 


More information about the rules-users mailing list