[rules-users] Planner 5.3.Final - "presumedScore is corrupted" when using "update" on the rules working memory => shadow proxies problems?

Geoffrey De Smet ge0ffrey.spam at gmail.com
Sun Dec 4 02:43:05 EST 2011



Op 03-12-11 06:08, guyramirez schreef:
>> WorkingMemory.getClass().getPackage().getSystem*Domain() or something
> similar
>> which should output something like drools-core-5.3.0.Final.jar
> I got:
> this.workingMemory.getClass().getPackage()
> 	 (java.lang.Package) package org.drools.reteoo, Drools :: Core, version
> 5.3.0.Final
>
>
>> - In Drools Expert, there are 2 classes named WorkingMemory and also 2
>> named FactHandle.
>> Planner 5.3 is still using those in the org.drools (which are the older
>> ones), not those in org.drools.runtime.rule (which are the newer ones).
>> Do a global search for "import org.drools.runtime.rule". That should
>> give no results.
> I got no results back but I ran the search in JBoss Studio against the
> binaries. Not sure this search should work.
Not on the binaries (presuming you mean the .class or .jar files by that),
but run that search on your source files (.java files).
> Yes I can see the two classed when I search for the types in the IDE.
>
> Anything else I could check?
>
> I have been playing with the hashCode implementations of the facts and
> planning entity but still no luck. I am assuming Expert is very dependant of
> the hash code results.
The standard Java equals-hashcode contract must be fulfilled (same 
restriction as keys that are put into a java.util.Map).

So if A and B are equals(), then A and B must have the same hashcode.
And if A and B have a different hashcode, then A and B must be !equals().
(Note: but if A and B have the same hashcode, then A and B might or 
might not be equals()).
See javadoc on java.lang.Object#equals().
>   For an update of a fact in the working memory, would
> Expert expect the hash to change between the original fact and the new
> updated one?
No.

Take a look how I do it in the examples.

If this all doesn't work, can you copy the full error message, the drl, 
the move file and the planning entity class file?
> Guy
>
>
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Planner-5-3-Final-presumedScore-is-corrupted-when-using-update-on-the-rules-working-memory-tp3546932p3556532.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
>

-- 
With kind regards,
Geoffrey De Smet





More information about the rules-users mailing list