[jboss-jira] [JBoss JIRA] (DROOLS-296) Drools date coercion and conditional OR
Szymona Wal (JIRA)
issues at jboss.org
Tue Nov 8 05:18:00 EST 2016
[ https://issues.jboss.org/browse/DROOLS-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13318638#comment-13318638 ]
Szymona Wal commented on DROOLS-296:
------------------------------------
Hello,
is this bug same problem for this issue: http://stackoverflow.com/questions/40483684/drools-or-vs-and-inside-map-check-not-work-same-way ? Unfortunatly, I cannot change drools to 6.X, to much effort with API change and logic behind building Knowledgebase, adding, removing, updating. Is it lost in 5.6.X then?
> Drools date coercion and conditional OR
> ---------------------------------------
>
> Key: DROOLS-296
> URL: https://issues.jboss.org/browse/DROOLS-296
> Project: Drools
> Issue Type: Bug
> Affects Versions: 5.5.0.Final
> Environment: Windows 7
> Reporter: Madhura Jayaratne
> Assignee: Mario Fusco
> Fix For: 6.0.1.Final
>
>
> 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']
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list