-
Bug
-
Resolution: Obsolete
-
Major
-
7.0.0.Beta7
-
None
-
NEW
-
NEW
Presume this then side:
rule "Minimum and maximum number of assignments" ... then int totalInt = $total.intValue(); if ($contractLine.isMinimumEnabled() && totalInt < $contractLine.getMinimumValue()) { scoreHolder.addSoftConstraintMatch(kcontext, (totalInt - $contractLine.getMinimumValue()) * $contractLine.getMinimumWeight()); } else if ($contractLine.isMaximumEnabled() && totalInt > $contractLine.getMaximumValue()) { scoreHolder.addSoftConstraintMatch(kcontext, ($contractLine.getMaximumValue() - totalInt) * $contractLine.getMaximumWeight()); } end
When this rule changes (not unmatches, but matches differently), and the original match added a soft constraint, but the new match does not add any soft constraint, then the original added soft constraint isn't undone (reverted).
The reason is that in Drools we can listen to unmatch events, but we cannot listen to change events.
- is blocked by
-
DROOLS-1478 Call ActivationUnMatchListener also when a rule rematches
- Closed