Even if you get the packages using REST API, you still need to add them to a kbuilder (you don't need to have multiple kbuilders. 1 kbuilder can contain multiple packages). <div>What you can do if you don't want to manually add all the packages to a kbuilder is to create a change-set, which is basically an xml pointing to all the resources you want to add. Then, you add the change-set to the kbuilder with ResourceType.CHANGE_SET. For more information about change-sets, please refer to the documentation.</div>
<div><br></div><div>Best Regards ,</div><div><br><div>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Tue, Dec 13, 2011 at 6:21 AM, srinivasasanda <span dir="ltr"><<a href="mailto:srinivasasanda@gmail.com">srinivasasanda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Esteban,<br>
<br>
*Listing Packages*<br>
<br>
<br>
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();<br>
kbase.addKnowledgePackages(kbuilder1.getKnowledgePackages());<br>
kbase.addKnowledgePackages(kbuilder2.getKnowledgePackages());<br>
int flag=1;<br>
for(KnowledgePackage kp :kbase.getKnowledgePackages())<br>
{<br>
<br>
<br>
System.out.println("Package Names are"+kp.getName());<br>
}<br>
The code which i had written here can possible to retrieves the<br>
list of packages.Here,I added snapshots to kbuilder1,kbuilder2 and through<br>
kbase iam retrieving the packages list.Is it is possible to retrieve list of<br>
packages without adding package snapshots to kbuilder.???It means i think<br>
through repository.xml...How can i achieve that???<br>
<br>
Even i referred REST API but unable to retrieve XML nodes from it<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Fact-Names-in-a-Model-tp3572234p3581479.html" target="_blank">http://drools.46999.n3.nabble.com/Fact-Names-in-a-Model-tp3572234p3581479.html</a><br>
</font></span><div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div></div>