Nicolas,
Strict mode works in 5.2. If you set drools.dialect.mvel.strict="false" as a
system property it will work correctly. If you want to do it all in spring you can set
system properties in your spring config but make sure that the property is set before the
Drools beans are initialized. Setting it via a system property will only work one time
after that it is cached in the confi.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Joe White
Sent: Thursday, June 16, 2011 11:49 AM
To: Rules Users List
Subject: Re: [rules-users] How to the set
"drools.dialect.mvel.strict"usingDrools+Spring?
Can you try adding an explicit cast for the result of the hashMap on the RHS. Would be a
workaround for now. I'm working on a test for scrict mode in 5.2.
So your RHS would be something like:
actuator.writeOutput(kcontext, (MyObj)hashMap.get($event.userId));
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of Nicolás Sanchez
Sent: Thursday, June 16, 2011 11:42 AM
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] How to the set "drools.dialect.mvel.strict"
usingDrools+Spring?
This is the rule, that used to work on drools 5.1.1 and now fails when
compiling in drools 5.2.0.CR1
rule "Transaction at unusual hours"
dialect "mvel"
when
$event : Event( callDateTime.hours >= 2,
callDateTime.hours <= 6,
amount > 4000) from entry-point Event
then
actuator.writeOutput(kcontext, hashMap.get($event.userId));
end
The error that throws, is the next one:
[Error: unable to resolve method using strict-mode:
com.wordpress.nicozan.Actuator.writeOutput(org.drools.spi.KnowledgeHelper,
java.lang.Object)]
[Near : {... actuator.writeOutput(kcontext, hashMap. ....}]
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-How-to-the-set-drools-diale...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users