A special case that drl couldn't compile when using 'contains' operator on a
value which is get from a external literal map
---------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3339
URL:
https://issues.jboss.org/browse/JBRULES-3339
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.3.0.Final
Environment: sun jdk 1.6u27, unbuntu linux 11.04 amd64, drools 5.3.0 final
Reporter: Miles Wen
Assignee: Mark Proctor
This code couldn't compile:
package com.sample
import com.sample.Msg;
import java.util.Map;
import java.util.Date;
global java.util.Map literalMap;
rule "out"
when
Msg(true || set contains ((Date)literalMap.get("date")))
then
end
which emits error msg:
Unable to Analyse Expression true || set contains
((Date)literalMap.get("date")):
[Error: unable to resolve method using strict-mode:
com.sample.Msg.contains(java.util.Date)]
[Near : {... true || set contains ((Date)literalMap.get ....}]
^
[Line: 16, Column: 9] : [Rule name='out']
java.lang.IllegalArgumentException: Could not parse knowledge.
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:82)
at com.sample.DroolsTest.main(DroolsTest.java:34)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira