[rules-users] How can I get Rule Id

srinivasasanda srinivasasanda at gmail.com
Thu Dec 8 07:47:00 EST 2011


Thanks Laune,

I able to retrieve all rulenames (which are unique )present in a
package.Could you please suggest me how to retrieve fact names in
Declarative Model present in a package.Here is my code to retrieve the rules
present in package

Collection<KnowledgePackage> kpackages =
kbuilder2.getKnowledgePackages();//where I configured kbuilder to url
			for(KnowledgePackage kpackage : kpackages) {
				
			    for(org.drools.definition.rule.Rule rule : kpackage.getRules()) {
			    	
			    	
			 
			      System.out.println(rule.getName());
			    }
			}

Can we enhance this code to get Fact names present in Declarative model
present in the package or could you please suggest me the way to do it.

Please..

Thanks in Advance

--
View this message in context: http://drools.46999.n3.nabble.com/How-can-I-get-Rule-Id-tp3564401p3570197.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list