You are adding 100 to a non-existing Map entry. Doing this in Java code like e.g.<br><br>   HashMap&lt;String,Integer&gt; m = $u.getSubjectGradeMap();<br>   m.put( &quot;CompSc&quot;, m.get( &quot;CompSc&quot; ) + 100 );<br>
<br>would have thrown a NullPointerException, and you would have seen the problem.<br><br>MVEL, with its balmy-barmy way of hiding the realities of programming from you, sinks you in an infinite loop...<br><br>Verified with current master, and I won&#39;t create a JIRA for this one either, as moticated previously.<br>
<br>-W<br><br><br><div class="gmail_quote">2011/8/28 Neel <span dir="ltr">&lt;<a href="mailto:neeleshdev@yahoo.co.in">neeleshdev@yahoo.co.in</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
Hi,<div>I&#39;m using drools-5.3.0.Beta1. I&#39;ve following rule definition:</div><div><p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<font color="#b70000"><br></font></p>
<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 15px;"><span style="color: rgb(183, 0, 0);">import</span> java.util.*;</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 15px;"><br></p>
<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;"><span style="color: rgb(183, 0, 0);">declare</span> Student</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">   name : String @key</p>
<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">   subjectGradeMap : HashMap   </p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">end</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; min-height: 15px;"> </p>
<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(0, 151, 0);"><span style="color: rgb(183, 0, 0);">rule</span><span style="color: rgb(0, 0, 0);"> </span>&quot;Subject grade points&quot;</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">dialect<span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 151, 0);">&quot;mvel&quot;</span></p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">when</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">   $u : Student()</p>
<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">then</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">   $u.subjectGradeMap[<span style="color: rgb(0, 151, 0);">&quot;CompSc&quot;</span>] += 100;</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal;">   System.out.println(<span style="color: rgb(0, 151, 0);">&quot;Marks added&quot;</span>);</p>

<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">end</p>
<p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);"><span style="color: rgb(0, 0, 0); font-family: arial; font-size: 13px;"><br>
</span></p><p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: arial; font-size: 13px;">While executing RHS of above rule, fireAllRules() doesn&#39;t return, it hangs.</span></p><p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: arial; font-size: 13px;">Please help.</span></p><p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: arial; font-size: 13px;">Thanks,</span></p><p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">
<span style="color: rgb(0, 0, 0); font-family: arial; font-size: 13px;">Neel</span></p><font color="#888888"><p style="margin: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; line-height: normal; font-size-adjust: none; font-stretch: normal; color: rgb(183, 0, 0);">
<br></p></font></div></td></tr></tbody></table><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>
<br></blockquote></div><br>