David and Ingomar

Thanks for the help. I want to keep track of exceptions that occur in my 
production system and maybe send out an email with the list of rule names that 
were executed and the stack trace.

So WorkingMemoryFileLogger would not work well for me. But I just implemented a 
AgendaEventListener and seems like it would do the job for me.

I will look into the ConsequenceExceptionHandler also.

Thanks once again.

Vikas

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Ingomar Otter
Sent: Monday, May 18, 2009 10:11 AM
To: Rules Users List
Subject: Re: [rules-users] Rules Debugging

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 
> ([email protected] 
> ) 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
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users


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 ([email protected]) 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
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to