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

Michael Neale (JIRA) jira-events at lists.jboss.org
Mon Apr 21 19:35:44 EDT 2008


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: Mark Proctor
             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