[rules-users] AgendaGroup and AgendaFilter
Mark Proctor
mproctor at codehaus.org
Mon Jul 11 19:18:49 EDT 2011
On 11/07/2011 20:43, Saleem Lakhani wrote:
>
> Hi,
>
> _Previous Code from drools 3.x:_
>
> Below is an example of overridden method in a class that implemented
> *org.drools.spi.AgendaFilter*
>
> public boolean accept(Activation activation) {
>
> boolean evaluateRule = false;
>
> */String agendaGroup = activation.getRule().getAgendaGroup();/*
>
> if (functionalArea.equalsIgnoreCase(agendaGroup) {
>
> evaluateRule = true;
>
> }
>
> return evaluateRule;
>
> }
>
> *_Drools 5.x_*
>
> Now I have changed the implementation to
> *org.drools.runtime.rule.AgendaFilter*
>
> **
>
> How do I re-write the bold-italic line inside the method when variable
> activation is now an instance of *org.drools.runtime.rule.Activation;*
>
> It doesn't support */activation.getRule().getAgendaGroup();/*
>
We have no made those public yet. We've kept Rule, like much of -api,
minimal. rule "groups" in general need a rethink and I don't want to
bloat the api. What you can do for now is cast to org.drools.rule.Rule
to get that information, just remember that it's a deprecated class and
can be changed on any release.
Mark
>
> *//*
>
> Thanks,
>
> saleem
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110712/a49eb418/attachment.html
More information about the rules-users
mailing list