[rules-users] Fact Names in a Model
Esteban Aliverti
esteban.aliverti at gmail.com
Tue Dec 13 03:15:09 EST 2011
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).
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.
Best Regards ,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
On Tue, Dec 13, 2011 at 6:21 AM, srinivasasanda <srinivasasanda at gmail.com>wrote:
> Hi Esteban,
>
> *Listing Packages*
>
>
> KnowledgeBase kbase =
> KnowledgeBaseFactory.newKnowledgeBase();
>
> kbase.addKnowledgePackages(kbuilder1.getKnowledgePackages());
>
> kbase.addKnowledgePackages(kbuilder2.getKnowledgePackages());
> int flag=1;
> for(KnowledgePackage kp :kbase.getKnowledgePackages())
> {
>
>
> System.out.println("Package Names
> are"+kp.getName());
> }
> The code which i had written here can possible to retrieves the
> list of packages.Here,I added snapshots to kbuilder1,kbuilder2 and through
> kbase iam retrieving the packages list.Is it is possible to retrieve list
> of
> packages without adding package snapshots to kbuilder.???It means i think
> through repository.xml...How can i achieve that???
>
> Even i referred REST API but unable to retrieve XML nodes from it
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Fact-Names-in-a-Model-tp3572234p3581479.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20111213/82f774b7/attachment.html
More information about the rules-users
mailing list