[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1569) Can't use "this" keyword in MVEL dialect

Michael Neale (JIRA) jira-events at lists.jboss.org
Fri May 2 18:38:18 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBRULES-1569?page=comments#action_12411671 ] 
            
Michael Neale commented on JBRULES-1569:
----------------------------------------

Jeff D was - couldn't use this - I am not sure if it was fixed as the result of some other bug - I remember a lot of chatter to do with it on irc - and yes, nothing to do with mvel it seems. 

Can close this one I think.

> 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

        



More information about the jboss-jira mailing list