Again and again, I have urged the addition of methods for retrieving
from the stable API's Rule class object all that can be written in the
DRL. There's really no point in hiding this while it's a plainly
visible and heavily used DRL feature. Moreover, sensible SW
development would require you to keep track of features, etc.
Here's the code to get the agenda group. Note that the Rule class is
from a different package and it's NOT in the stable API.
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();
}
@srinivasandra: Get into the habit of using generic parameters (with
e.g. Collection<X>) and catch up on Java's "for" statement. Both will
improve your code.
-W
On 2 December 2011 07:27, srinivasasanda <srinivasasanda(a)gmail.com> wrote:
Thank you..I've found to get tule names..But how can I get agenda
group
names..Can you suggest this
--
View this message in context:
http://drools.46999.n3.nabble.com/display-all-rules-name-tp3553740p355389...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users