Apparently there has been some confusion between the two interfaces called AgendaFilter. But these classes are so simple that you can write your own.

import org.drools.runtime.rule.Activation;
import org.drools.runtime.rule.AgendaFilter;

public class EndAgendaFilter  implements AgendaFilter {
    private final String  suffix;

    private final boolean accept;

    public EndAgendaFilter(final String suffix) {
        this( suffix,
                true );
    }

    public EndAgendaFilter(final String suffix,
            final boolean accept) {
        this.suffix = suffix;
        this.accept = accept;
    }

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





On 19 December 2010 18:47, Benson Fung <benson.redhat@gmail.com> wrote:
Hi,

I would like to file specific rules in Drools 5.1.  However, the RuleNameEndsWithAgendaFilter no longer works in FireAllRules of Drools 5.1. 


Please help

Thanks

_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev