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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

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

Reply via email to