[rules-users] Question about getObjects() on workspace with defeasible belief system

Mark Proctor mproctor at codehaus.org
Mon Jul 21 21:12:44 EDT 2014


Easiest thing is to look at the code:
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSet.java
https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/beliefsystem/defeasible/DefeasibleBeliefSystem.java

And tests:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/beliefsystem/defeasible/DefeasibilityTest.java

As Davide said, this is highly experimental. It’s likely we won’t use a ‘neg’ entry point in the future to handle negated facts, but instead provided a meta property.

Mark

On 21 Jul 2014, at 23:41, Borris <borris at chaos.org.uk> 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list