-
Feature Request
-
Resolution: Done
-
Major
-
None
-
7.7.0.Final
-
None
-
2018 Week 36-38
-
NEW
-
NEW
While upgrading Drools from version 6.5 to 7.7.0, there is a compile issue in rules that use Date Compare.
e.g. the following rule works fine in 6.5, but errors out in 7.7.0:
when
$inventory : AllocatedInventory(expireDateTime != null && (expireDateTime > Custom.todayPlus(0) && <= Custom.todayPlus(2)) )
…
then
modify(...)
retract($inventory);
end
=======================
Custom function returns Java LocalDateTime (java.util.Date and JodaTime use is deprecated)
The reason it breaks is due to check in function https://github.com/kiegroup/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/rule/builder/MVELConstraintBuilder.java#L229
Previous version does not have that check. Now, it seems the compiler check compares date value to java.util.Date
Request a feature to allow LocalDateTime date compare
- duplicates
-
DROOLS-2704 Support Java 8 date API in dates comparison
- Closed