getObjects() will return all the objects. However, an object's HANDLE
will be in the default x-or in the "neg" entry-point, depending on whether
the object was asserted in the positive or negative form, and depending
on the conflict resolution by defeasibility.
In my snippet, "myNegatedObject" was supposedly an object in
"negative"
form.
If you are trying to build a pretty printer, you may just want to iterate
the fact handles directly. Methods such as
session.getEntryPoints()
session.getEntryPoint( entryPointName ).getFactHandles();
will help
On 07/22/2014 12:41 AM, Borris wrote:
And thanks for the response!
A quick question on your example code before I try it:
On 21/07/2014 21:24, Davide Sottara wrote:
> Notice that "negatively" asserted facts end up in a "negative"
entry
> point, so you have to look them
> up explicitly:
> InternalFactHandle negHandle = (InternalFactHandle)
> session.getEntryPoint( "neg" ).getFactHandle( myNegatedObject );
>
Is myNegatedObject just the set that getObjects() returned or is there
another enumeration method I should use? Ie do I Iook for a neg entry
point object for each object I get back from ksession.getObjects() or do
I need to acquire a collection from another place (as well) if I want to
enumerate everything in the workspace for my dumpWorkspace() pretty printer?
Thanks
Borris
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users