[rules-users] Sir, Seekin your's Help on Drool

San sangram.jy at gmail.com
Wed Apr 18 08:24:24 EDT 2012


pp:PremiumCalculatorFormBean (fact in this case) contains 2 int fields age
and premiumPaymentTerm.

I need to validate (age+premiumPaymentTerm) sud nt b >70.

So in 1st condition column  i am calling a method 
 int getMaturityAge(pp) {
          int maturityAge=0;
          int age=0;
          int premiumPaymentTerm=0;
          maturityAge=age+premiumPaymentTerm;
         return maturityAge;
}

In the condition I write,  maturityAge(pp) > "$1" and provide 70 as the
param value.

Nw the error that I am gettin...

1) while writing the above condition , it is unable to resolve pp.
    ....no viable alternative at input 'pp' in rule "MaturityAge
Validation_38"

2) for testing purpose I call this method without any argument and returning
90.
    In his case also I am getting 

      ...no viable alternative at input ')' in rule "MaturityAge
Validation_38"
     ...mismatched input '>' expecting ')' in rule "MaturityAge
Validation_38"

In Action part I have put System.out.println("Maturity value sud be less
than 70 ")


--
View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Sir-Seekin-your-s-Help-on-Drool-tp3919571p3919784.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list