for( KnowledgePackage kp: kbase.getKnowledgePackages() ){
System.out.println( kp.getName() );
}
// -W
On 30 November 2011 15:25, srinivasasanda <srinivasasanda(a)gmail.com> wrote:
Hi Vignesh and Esteban,
Please help me out in this issue..From your code,I'm trying to display the
packages present in the kbase.But it is displaying hashcode instead of
Package name.Here is my code
KnowledgeBuilder kbuilder1 = KnowledgeBuilderFactory.newKnowledgeBuilder();
KnowledgeBuilder kbuilder2 = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder1.add(ResourceFactory.newUrlResource("http://localhost:8082/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/big/LATEST"),ResourceType.PKG);
kbuilder2.add(ResourceFactory.newUrlResource("http://localhost:8082/guvnor-5.2.0.Final-jboss-as-5.1/org.drools.guvnor.Guvnor/package/persondetails/LATEST"),ResourceType.PKG);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder1.getKnowledgePackages());
kbase.addKnowledgePackages(kbuilder2.getKnowledgePackages());
Collection c=for;
Iterator it=c.iterator();
while(it.hasNext())
{
System.out.println(it.next().toString());
}
The output is
org.drools.definitions.impl.KnowledgePackageImp@1f0b7d3
org.drools.definitions.impl.KnowledgePackageImp@b4be3d
I need to display package names present in KBase as(big,persondetails which
are packagenames)..Please help
me........................................................
--
View this message in context:
http://drools.46999.n3.nabble.com/Firing-Mulitple-packages-tp1127290p3548...
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