[rules-users] Arithmetic operator in Condition part (Argent help.....)

DELBART Vincent delbart.v at mipih.fr
Tue Feb 12 11:22:06 EST 2008


The solution is :

rule  "Rule_decimal_1"
dialect "java"
when 
        $a : ApplyRuleBean()  
         m : ApplyRuleBean ( adultFare > $a.ChildFare + $a.InfantFare)
then 
         $a.GrossFare = ($a.ChildFare * 500);
end

In dialect "java", you have to put the object property first in condition. 


Vincent DELBART
Responsable Projet Moteur de Règles
MM - Prestataire APSIDE
  
12, rue Michel LABROUSSE 
B.P. 93668 
31036 TOULOUSE Cedex1 
Tel : 05.67.31.90.68
Tel (interne) : 4014
e-mail : delbart.v at mipih.fr


-----Message d'origine-----
De : rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] De la part de Nikhil_dev
Envoyé : mardi 12 février 2008 11:54
À : rules-users at lists.jboss.org
Objet : [rules-users] Arithmetic operator in Condition part (Argent help.....)


package com.vtech.fareengine.module.rulemanagermodule
import com.vtech.fareengine.module.rulemanagermodule.Bean.ApplyRuleBean;
rule  "Rule_decimal_1"
dialect "java"
when 
        $a : ApplyRuleBean()  
         m : ApplyRuleBean ( ($a.ChildFare + $a.InfantFare) > adultFare ) then 
         $a.GrossFare = ($a.ChildFare * 500); end sourceDRL :: java.io.StringReader at e2bc8d[7,36]: unknown:7:36 Unexpected token '+'
java.lang.RuntimeException: Unable to compile drl
--
View this message in context: http://www.nabble.com/Arithmetic-operator-in-Condition-part-%28Argent-help.....%29-tp15430904p15430904.html
Sent from the drools - user 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