I'd try using free-format DRL and breaking the expression down into smaller parts until it works.
I can't see anything wrong with the syntax - unless it relates to the bug Wolfgang said was fixed for 5.4.0 (I *assume* he'd mean FINAL).
The advice, as I have given before, would not to use a beta version as it is bound to have bugs in that were fixed for FINAL.
I know you use it for the free-format text "Formula" TextBox in the RHS of the Guided Editor, but free-format DRL (with 5.4.0.FINAL) is a suitable workaround.
oops......now I tried by putting $ before sumAssured....still same error....
*[DeathBenefitRule] Unable to Analyse Expression$deathBenefit.setSumAssured( $sumAssured * ( 1 - (1 / (Math.pow ( (1 +
($interestRate/100),$policyTerm-$policYear+1) ) ) ) ) / (1 - (1 / (Math.poworg.drools.spi.KnowledgeHelper.,$policyTerm()] [Near : {...
( (1 + ($interestRate/100),$policyTerm) ) ) ) ) ); drools.update(
$deathBenefit );: [Error: unable to resolve method using strict-mode:
($interestRate/100),$policyTerm-$policYear+1) ) ) ....}] ^ [Line: 1, Column:
91]*
the source code --> *1. | rule "DeathBenefitRule"
2. | dialect "mvel"6. | $deathBenefit.setSumAssured( $sumAssured * ( 1 - (1 / (Math.pow
3. | when
4. | $deathBenefit : DeathBenefitFactModel( $sumAssured :
sumAssured, $interestRate : interestRate, $policYear : policYear,
$policyTerm : policyTerm)
5. | then
( (1 + ($interestRate/100),$policyTerm-$policYear+1) ) ) ) ) / (1 - (1 /View this message in context: http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013590.html
(Math.pow ( (1 + ($interestRate/100),$policyTerm) ) ) ) ) );
7. | update( $deathBenefit );
8. | end*
--
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users