[rules-users] How to set drools.dialect.mvel.strict = false?
jeetendray
jeetcyb at gmail.com
Tue Jun 4 17:30:04 EDT 2013
Hi,
Snippet of my DRL .
rule "Rev: Start Time < 2 Hours in Future"
when
$obj : eval(compareDatesWithTime(startDateTime, -2, 2, "<"))
then
$obj.addFailedRule("Rev: Start Time < 2 Hours in Future");
end
This fails during compilation and throws error:
org.drools.rule.InvalidRulePackage: Unable to Analyse Expression
(eval(compareDatesWithTime(startDateTime, -2, 2, "<")) ):
[Error: unable to resolve method using strict-mode: myObject.eval(boolean)]
[Near : {... (eval(compareDatesWithTime(star ....}]
^
[Line: 6, Column: 2] : [Rule name='Proposal - Start time is after current +
2 hour']
I am using Drools 5.5 and I found the cause that my code runs in strict
mode.. so If I set strict mode to false then this would work. Now I am not
sure how to make it to false.
Here's the code I am using:
PackageBuilderConfiguration packageBuilderConfiguration = new
PackageBuilderConfiguration();
PackageBuilder packageBuilder = new
PackageBuilder(packageBuilderConfiguration);
packageBuilder.addPackageFromDrl(drl.getCharacterStream());
Can someone please suggest me how to do that??
Thanks!!!
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-set-drools-dialect-mvel-strict-false-tp4024122.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list