[rules-users] Infinite loop in rule condition matching

Sartaj Shaik sartaj.shaik at tcs.com
Thu Mar 10 11:44:46 EST 2011


Hi,

I have written some rules in Decision table (Web-guided editor), and I 
have implemented the AgendaFilter to fire rules that ends with the rule 
name specified (EndAgendaFilter)
here is the accept method I have written.

When I fire the rules ends with some "XXXXX", this accept method goes into 
infinite loop and my Sysout prints "Rule 1 XXXXX" infinite times.

(Note: all the condition variables that i have passed to guvnor matches 
with the first row of that rule, hence getting Rule 1 XXXXX)

                public boolean accept(final Activation activation) {
                        System.out
.println(activation.getRule().getName());
                        if (activation.getRule().getName().endsWith(this.
suffix)) {
                                return this.accept;
                        } else {
                                return !this.accept;
                        }
                }


All my other rules are working fine, even I have created the same rule 
again (same conditions, actions, data etc) it is working properly.

Don't know what is the root cause, any ideas?

I have 3 similar rules which are failing, and those rules contains lot of 
rows, so can't create the new rules for those again to make them work :(

Please help!!!
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110310/49ba29bc/attachment.html 


More information about the rules-users mailing list