[rules-users] How can I get rule's agenda group name?

Wolfgang Laun wolfgang.laun at gmail.com
Tue Dec 6 05:16:11 EST 2011


On 06/12/2011, Zhao Yi <zhaoyi0113 at gmail.com> wrote:
> Is it your post?
>
>
> laune wrote
>>
>> for( Rule rule: knowledgePackage.getRules() ){
>>     String ruleName = rule.getName();
>>     org.drools.rule.Rule realRule =
>>         (org.drools.rule.Rule)
>> ((KnowledgePackageImp)knowledgePackage).getRule( ruleName );
>>     String agName = realRule.getAgendaGroup();
>> }
>>

Yes.

>
> I wander where the knowledgePackage coming from. I am in
> beforeActivationFired method, how can I get knowledgePackage in this method?

Pass your listener a reference to the KnowledgeBase, which will give
you the knowledge packages; the rule contains the package name, and so
on.

-W

>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/How-can-I-get-rule-s-agenda-group-name-tp3508539p3563830.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list