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(a)mipih.fr
-----Message d'origine-----
De : rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] De
la part de Nikhil_dev
Envoyé : mardi 12 février 2008 11:54
À : rules-users(a)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@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-hel...
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