Drools date coercion and conditional OR
Issue
If I try a simple Drools rule with conditions on date type and uses conditional OR (||) I get the following error. If I change || to && it works fine.
Condition
$container: DateContainer( date >= "15-Oct-2013" || date <= "01-Oct-2013" )
Error
Unable to Analyse Expression date >= "15-Oct-2013" || date <= "01-Oct-2013":
[Error: Comparison operation requires compatible types. Found class java.util.Date and class java.lang.String]
[Near :
{... date >= "15-Oct-2013" || date <= "01-Oct-2013" ....}
]
^
[Line: 9, Column: 1] : [Rule name='Test rule']
Environment
- Red Hat JBoss BRMS
- 5.3.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
