The Rete algorithm imposes severe restrictions on the way fact updates may be performed and the when and where these changes are advertised to the inference engine.

The picture that's in my mind is one of many evaluations of boolean expressions in parallel on many fact objects, partially being held up due to lack of additional fact matches or true properties, and partially waiting for being "fired"; and such evaluations are "snapshot" as data structures in the Engine's memory. Due to an announcement of a change in one fact such recorded evaluations may have to be retracted and retraced, reevaluating conditions with their unchanged partners. But some of that partner data may have been represented in Engine memory, and this is what matters for the reevaluation - not the actual content of that partner's object data.

-W


On 10 March 2012 19:38, Reinis <drools@orbit-x.de> wrote:
Closing this thread!

Error was in this code-block:

{code}
fooLeft.setBar(fooRight.getBar());
fooRight.setBar(barLeft);
session.update(fooLeftFact, fooLeft);
session.update(fooRightFact, fooRight);
{code}

following fix makes the error go away:

{code}
fooLeft.setBar(fooRight.getBar());
session.update(fooLeftFact, fooLeft);
fooRight.setBar(barLeft);
session.update(fooRightFact, fooRight);
{code}

Pull request retracted and I have a bad taste in my mouth since I have no technical/logical explanation why so.

Thank you guys for all the help!


On 03/09/2012 02:21 PM, Wolfgang Laun wrote:

> Works also with 5.4.0.Beta2.
>
> Does this really fail in the context of Drools' unit tests?
>
> -W
>
>
> On 9 March 2012 12:23, Wolfgang Laun <wolfgang.laun@gmail.com
> <mailto:wolfgang.laun@gmail.com>> wrote:
>
>     Can't reproduce the described effect with 5.3.0.Final, will look at
>     5.4.0.Beta2 later today.
>
>     As far as I can see, the test case asserts the correct result which
>     Drools produces anyway?
>
>     -W
>
>     On 09/03/2012, ge0ffrey <ge0ffrey.spam@gmail.com
>     <mailto:ge0ffrey.spam@gmail.com>> wrote:
>     > Great work Reinis!
>     >
>     > --
>     > View this message in context:
>     >
>     http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-Hard-constraint-appears-to-be-ignored-tp3777209p3812319.html
>     > Sent from the Drools: User forum mailing list archive at Nabble.com.
>     > _______________________________________________
>     > rules-users mailing list
>     > rules-users@lists.jboss.org <mailto:rules-users@lists.jboss.org>
>     > https://lists.jboss.org/mailman/listinfo/rules-users
>     >
>
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users