<div>Hi Starke,</div>
<div>&nbsp;</div>
<div>Thanks a lot for your inputs. Apart from being able to debug using your stuff, my main concern is that a simple declaration is making the rule not to fire. Why is that so? </div>
<div>I am pretty sure, when i remove that particular line the fact which is passed passes the condition. </div>
<div>&nbsp;</div>
<div>The Drools documentation has a clear example which does the same. </div>
<div>&nbsp;</div>
<div>Any help in this regard will highly be appreciated.</div>
<div>&nbsp;</div>
<div>Thanks</div>
<div>Natraj<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Dr. Gernot Starke</b> &lt;<a href="mailto:gs@gernotstarke.de">gs@gernotstarke.de</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Natraj,<br><br>I wrote up a few tactics to (successfully) debug rules:<br><br><a href="http://rbs.gernotstarke.de/faq/faq/faq-devel.html">
http://rbs.gernotstarke.de/faq/faq/faq-devel.html</a><br><br>It&#39;s neither finished nor complete - but try it out...<br>(test both conditions with one rule for each of them,<br>test for the existence of the appropriate facts,
<br>include a catchall-rule which prints all facts from wm.)<br><br>regards,<br>Gernot<br><br><br>&gt; Hi, I am using Drools 3.0.6, and facing a peculiar problem.<br>&gt;<br>&gt; My rule:<br>&gt;<br>&gt; *<br>&gt;<br>&gt; rule* &quot;Calculate Business profit,1&quot;*
<br>&gt; **salience* 1000<br>&gt;<br>&gt; *when<br>&gt;<br>&gt; **EMIAgainstProperty ( BP1 : refBP1 )<br>&gt; *emi : EMIAgainstProperty ( businessProfit2 &gt; BP1 )<br>&gt;<br>&gt; *then* *<br>&gt; *System.out.println(&quot; BP &quot;+(
emi.getBusinessProfit1<br>&gt; ()+emi.getBusinessProfit2())/2);*<br>&gt; *emi.setBusinessProfit((emi.getBusinessProfit1<br>&gt; ()+emi.getBusinessProfit2())/2);*<br>&gt; **end*<br>&gt;<br>&gt; **<br>&gt;<br>&gt; The above line in bold inside the condition part seem to create problem
<br>&gt; for<br>&gt; rule evaluation. WHen i have this, the rule does not show up in the Agenda<br>&gt; view, hence i dont see the console print in the action part. As soon as i<br>&gt; remove this line and replace BP1 with 
1.5 in the second line, i see the<br>&gt; rule<br>&gt; being fired.<br>&gt;<br>&gt; As far as i understand, I am doing a declaration to set refBP1 an object<br>&gt; attribute to BP1, which i later use.What is that i am missing here? My
<br>&gt; fact<br>&gt; has proper getter and setters for refBP1 attribute.<br>&gt;<br>&gt;<br>&gt;<br>&gt; Thanks<br>&gt;<br>&gt; Natraj<br>&gt; _______________________________________________<br>&gt; rules-users mailing list
<br>&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>&gt;
<br><br><br>--<br>Dr. Gernot Starke<br>Willi-Lauf Allee 43, D-50858 Köln<br>Tel. +49 (0) 177 - 728 2570<br>Mail: <a href="mailto:gs@gernotstarke.de">gs@gernotstarke.de</a><br><a href="http://www.gernotstarke.de">http://www.gernotstarke.de
</a><br><a href="http://www.arc42.de">http://www.arc42.de</a><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">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br>