-
Feature Request
-
Resolution: Done
-
Critical
-
None
-
None
The exception "presumedScore is corrupted because it is not the realScore", can occur for multiple reasons:
- The Move.createUndoMove() method is incorrectly implemented. If a Move A moves from X to Z, then the undo Move should move A from Z to X.
- The score constraints do insertLogical's of something else than a class that extends ConstraintOccurrence. Although it is technically not 100% required to do this, there are specific technical requirements on those logically inserted classes by Drools Expert to keep the score uncorrupted. So it's far easier just to use IntConstraintOccurrence or to extend ConstraintOccurrence correctly.
- The score constraints, which do insertLogical's of ConstraintOccurrence, forget to add a cause too little or too much. The exception message should identify which of the ConstraintOccurrences are corrupted and only list those.
- Drools Expert 5.1 or lower is used (these possibly have bugs in the statefull working memory. From drools 5.2 this is proven not the be the case).