The variables in the RHS's DRL aren't prefixed with $ as they are in the LHS.
sent on the move On 24 May 2012 13:52, "zeeshan" <[email protected]> wrote: > Hi Laune and thanks for replying !! > > *1.* I am using *5.4.0 Beta* 1... I also tried by using *Math.pow* as Mike > posted above but by validating got error... *[DeathBenefitRule] Unable > to > Analyse Expression $deathBenefit.setSumAssured( sumAssured*(1-1/ > > Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm) > ); drools.update( $deathBenefit );: [Error: unbalanced braces ( ... )] > [Near > : {... enefit.setSumAssured( sumAssured*(1-1/ Math.pow((1 ....}] ^ [Line: > 1, > Column: 28]* > > > *2.* This I put in the Formula box --> *=sumAssured*(1-1/ > > Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)* > > > *3.* This is generated source code ---> 1*. | rule > "DeathBenefitRule" > 2. | dialect "mvel" > 3. | when > 4. | $deathBenefit : DeathBenefitFactModel( $sumAssured > : > sumAssured, $interestRate : interestRate, $policYear : policYear, > $policyTerm : policyTerm) > 5. | then > 6. | $deathBenefit.setSumAssured( sumAssured*(1-1/ > > Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm) > ); > 7. | update( $deathBenefit ); > 8. | end* > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013466.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users >
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
