[rules-users] Rules Debugging
Ingomar Otter
iotter at mac.com
Mon May 18 13:11:19 EDT 2009
David already provided the answer, two more things:
* If your rule's consequences are throwing exceptions I've also found
it helpful to register a custom ConsequenceExceptionHandler (depending
on your actual infrastructure)
*Another way to get that information is to use the
WorkingMemoryFileLogger as described in here, gives you even a basic
UI in Eclipse. Despite the name it also includes rules fired.
http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/html/index.html
Caveat: Don't forget the writeToDisk (even on failure) and you may
need to increase Eclipse' memory allocation.
-- Ingomar
Am 18.05.2009 um 18:43 schrieb Vikas Phonsa:
> Hi All,
>
> I'm using Drools 4.0.7 with Java 1.4.
>
> Some of my rules are throwing exceptions and my goal is to get a
> list of names of all rules that are being executed (till the point
> the exception is thrown).
>
> I have tried doing
> stateLesssession.addEventListener( new DebugAgendaEventListener() );
> and it does give me a bunch of information about the agenda. But I
> want to narrow it down to the rules that are actually executed.
>
> Which event it called right after the execution control goes inside
> a rule (before the 'when' condition is executed)?
>
> Thanks,
> Vikas
>
>
> This email and/or any files or attachments transmitted with it are
> confidential and intended solely for the use of the individual or
> entity to whom they are addressed, and may contain information that
> is privileged, confidential and exempt from disclosure under
> applicable law. If you are not the intended recipient, or the
> employee or agent responsible for delivering the message to the
> intended recipient, you are hereby notified that any dissemination,
> distribution or copying of this e-mail and/or any files or
> attachments transmitted with it is strictly forbidden. If you have
> received this email in error, please delete the e-mail and/or any
> files or attachments, and also notify the system manager (PostMaster at mercuryinsurance.com
> ) of the error. Please note that any views or opinions presented in
> this email are solely those of the author and do not necessarily
> represent those of the company. Finally, the recipient should check
> this email and any attachments for the presence of !
> viruses. The company accepts no liability for any damage caused by
> any virus transmitted by this email and/or any files or attachments
> transmitted with it.
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
More information about the rules-users
mailing list