[rules-users] How to the set "drools.dialect.mvel.strict" usingDrools+Spring?

Joe White Joe.White at recondotech.com
Thu Jun 16 13:48:51 EDT 2011


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 at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Nicolás Sanchez
Sent: Thursday, June 16, 2011 11:42 AM
To: rules-users at 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-dialect-mvel-strict-using-Drools-Spring-tp3064468p3072994.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list