[
http://jira.jboss.com/jira/browse/JBRULES-1569?page=comments#action_12411575 ]
Edson Tirelli commented on JBRULES-1569:
----------------------------------------
Michael,
Are you getting some exception or something like that in the above example?
"this" is processed by drools in the above example... mvel is not used except to
execute the consequence that has no "this" reference.
[]s
Edson
Can't use "this" keyword in MVEL dialect
----------------------------------------
Key: JBRULES-1569
URL:
http://jira.jboss.com/jira/browse/JBRULES-1569
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.6
Reporter: Michael Neale
Assigned To: Edson Tirelli
Fix For: 5.0.0-M1
rule "Gold Discount"
dialect "mvel"
when
#conditions
order : OrderHeader()
customer : Customer()
Customer( this == customer, status >= "10" && <
"50" ) or OrderHeader( this == order, netAmount >= "50" &&
< "100" )
then
#actions
order.setOrderDiscount(6.0);
System.out.println("order discount for customer: " +
customer.getUserName() + " is " + order.getOrderDiscount());
end
will fail due to the "this == order" - this means something else in MVEL.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira