Date Between Dates with globals Not Triggering for Executable Model
tkobayas opened this issue · 1 comments
When using the Drools executable model (pre-compiled) to execute an expression of a Date being between two other Dates like DateHolder( date < $startDate && date > $endDate)
, the related rule does not fire when the date value is actually between the two Date constants. Note that $startDate
and $endDate
are globals.
Switching the order of the greater or less than statements does not fix the issue. Using inclusive between (<= and >=) does not solve the issue for date field values (non-inclusively) between the dates.
However if the expression is changed to "DateHolder( date < $startDate && > $endDate)" it does fire as expected.
I have not checked to see if this issue effects other data types like long or int.
Also when using the DRL files directly (= non-executable model) in the drools engine, this issue does not occur.
I have not checked to see if this issue effects other data types like long or int.
The issue is a problem in GlobalExtractor.equals
, so it would affect any types when you use more than 2 globals of the same type in one constraint.