Bug 1029908 - Drools date coercion and conditional OR
Summary: Drools date coercion and conditional OR
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER5
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks: 1072217
TreeView+ depends on / blocked
 
Reported: 2013-11-13 13:53 UTC by Mario Fusco
Modified: 2014-08-06 20:18 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1072217 (view as bug list)
Environment:
Last Closed: 2014-08-06 20:18:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-296 0 Major Resolved Drools date coercion and conditional OR 2015-08-14 06:48:15 UTC

Description Mario Fusco 2013-11-13 13:53:06 UTC
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']

Comment 1 Mario Fusco 2013-11-13 13:54:04 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/ba2fbd53b

Comment 2 JBoss JIRA Server 2013-11-13 13:54:58 UTC
Mario Fusco <mario.fusco> updated the status of jira DROOLS-296 to Resolved

Comment 4 Marek Winkler 2013-12-13 07:26:49 UTC
Verified on BRMS 6.0.0 ER5.


Note You need to log in before you can comment on or make changes to this bug.