Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Between Dates with globals Not Triggering for Executable Model #6010

Closed
tkobayas opened this issue Jul 5, 2024 · 1 comment · Fixed by #6011
Closed

Date Between Dates with globals Not Triggering for Executable Model #6010

tkobayas opened this issue Jul 5, 2024 · 1 comment · Fixed by #6011
Assignees

Comments

@tkobayas
Copy link
Contributor

tkobayas commented Jul 5, 2024

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.

@tkobayas
Copy link
Contributor Author

tkobayas commented Jul 5, 2024

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.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to 🎯 Done in 🦉 KIE Podling Board Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎯 Done
Development

Successfully merging a pull request may close this issue.

1 participant