Nikhil_dev wrote:
Hi!!!, vdelbart,
thank u for the solution, but is there any way i can run it with moving the
object
there is 1 more for which i need a solution
the following Rule dosen't work
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.AdultFare - $a.InfantFare) < ($a.ChildFare
+ $a.InfantFare) )
that is not valid DRL, you cannot randomly match field constraints and
arithmatic in that way, you'll have ot put it into an eval. Use the MVEL
dialect, or change it to a valid jave expression.
m : ApplyRuleBean ( eval( ($a.AdultFare - $a.InfantFare) < ($a.ChildFare
+ $a.InfantFare) ) )
then
$a.GrossFare = ($a.ChildFare * 500);
end
Follwing is the Error wat i get on compiling :
sourceDRL :: [EMAIL PROTECTED]
[7,36]: unknown:7:36 Unexpected token '-'[7,69]: unknown:7:69 mismatched
token: [EMAIL PROTECTED],264:264='+',<71>,7:69]; expecting type
LEFT_PAREN[7,84]:
unknown:7:84 mismatched token: [EMAIL PROTECTED],279:279=')',<12>,7:84];
expecting type
LEFT_PAREN[7,86]: unknown:7:86 mismatched token:
[EMAIL PROTECTED],281:281=')',<12>,7:86]; expecting type THEN
java.lang.RuntimeException: Unable to compile drl
is there any solution for this.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users