<p>The variables in the RHS&#39;s DRL aren&#39;t prefixed with $ as they are in the LHS.</p>
<p>sent on the move</p>
<p>On 24 May 2012 13:52, &quot;zeeshan&quot; &lt;<a href="mailto:zeeshan.spring@gmail.com">zeeshan.spring@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Laune and thanks for replying !!<br>
<br>
*1.* I am using *5.4.0 Beta* 1... I also tried by using *Math.pow* as Mike<br>
posted above but by validating got error...     *[DeathBenefitRule] Unable to<br>
Analyse Expression $deathBenefit.setSumAssured( sumAssured*(1-1/<br>
Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)<br>
); drools.update( $deathBenefit );: [Error: unbalanced braces ( ... )] [Near<br>
: {... enefit.setSumAssured( sumAssured*(1-1/ Math.pow((1 ....}] ^ [Line: 1,<br>
Column: 28]*<br>
<br>
<br>
*2.* This I put in the Formula box  --&gt;  *=sumAssured*(1-1/<br>
Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)*<br>
<br>
<br>
*3.* This is generated source code  ---&gt;  1*.   |       rule &quot;DeathBenefitRule&quot;<br>
2.      |           dialect &quot;mvel&quot;<br>
3.      |           when<br>
4.      |               $deathBenefit : DeathBenefitFactModel( $sumAssured :<br>
sumAssured, $interestRate : interestRate, $policYear : policYear,<br>
$policyTerm : policyTerm)<br>
5.      |           then<br>
6.      |               $deathBenefit.setSumAssured( sumAssured*(1-1/<br>
Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)<br>
);<br>
7.      |               update( $deathBenefit );<br>
8.      |       end*<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013466.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013466.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></p>