You have to write java (or mvel) in the THEN part. Have you tried this?
[when] IMRR action requested is in one of {acts} = Action(action in {acts})
[then] permitted =Decisions dec = new Decision(); dec.setDecision("Granted")
Best,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @
http://www.plugtree.com
- Blog @
http://ilesteban.wordpress.com
On Tue, Aug 3, 2010 at 5:18 PM, bbarani <bbarani(a)gmail.com> wrote:
Hi,
I am trying to execute a simple DSL as below. Decisions is the bean class
which I have imported in to Guvnor
[when] IMRR action requested is in one of {acts} = Action(action in {acts})
[then] permitted =dec:Decisions dec.setDecision("Granted")
Now I want the object for decision to be created and the value set in a
single mapping. I tried the above code and got the error as below.
[NamedParameterRule] Unable to build expression for 'consequence':
java.lang.Class cannot be cast to org.mvel2.util.MethodStub '
System.out.println("Rule Fired From Guvnor");
dec: Decisions () dec.setDecision("Granted")'
If I create the object in [when] clause it works fine. Any idea when this
error would pop up?? and how to resolve this?
Thanks,
Barani
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Not-able-to-create-ob...
Sent from the Drools - User mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users