I am trying to find a BucketTotal
object which has the smallest total
in a Drools Planner project. I adapted this from example code.
rule "insertMinimumBucketTotal"
when
$b : BucketTotal($total : total)
not BucketTotal(total > $total) // CONFUSED HERE
then
insertLogical(new MinimumBucketTotal($total));
end
As far as my reasoning went, it meant "find BucketTotal
object $b
, such that there doesnt exist another BucketTotal
object whose total
is greater than total
of $b
".
Turns out, it meant the opposite (and I corrected it).
Please explain how Drools reasons that statement to find $b
.