<div>Hi Starke,</div>
<div> </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> </div>
<div>The Drools documentation has a clear example which does the same. </div>
<div> </div>
<div>Any help in this regard will highly be appreciated.</div>
<div> </div>
<div>Thanks</div>
<div>Natraj<br><br> </div>
<div><span class="gmail_quote">On 7/18/07, <b class="gmail_sendername">Dr. Gernot Starke</b> <<a href="mailto:gs@gernotstarke.de">gs@gernotstarke.de</a>> 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'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>> Hi, I am using Drools 3.0.6, and facing a peculiar problem.<br>><br>> My rule:<br>><br>> *<br>><br>> rule* "Calculate Business profit,1"*
<br>> **salience* 1000<br>><br>> *when<br>><br>> **EMIAgainstProperty ( BP1 : refBP1 )<br>> *emi : EMIAgainstProperty ( businessProfit2 > BP1 )<br>><br>> *then* *<br>> *System.out.println(" BP "+(
emi.getBusinessProfit1<br>> ()+emi.getBusinessProfit2())/2);*<br>> *emi.setBusinessProfit((emi.getBusinessProfit1<br>> ()+emi.getBusinessProfit2())/2);*<br>> **end*<br>><br>> **<br>><br>> The above line in bold inside the condition part seem to create problem
<br>> for<br>> rule evaluation. WHen i have this, the rule does not show up in the Agenda<br>> view, hence i dont see the console print in the action part. As soon as i<br>> remove this line and replace BP1 with
1.5 in the second line, i see the<br>> rule<br>> being fired.<br>><br>> As far as i understand, I am doing a declaration to set refBP1 an object<br>> attribute to BP1, which i later use.What is that i am missing here? My
<br>> fact<br>> has proper getter and setters for refBP1 attribute.<br>><br>><br>><br>> Thanks<br>><br>> Natraj<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>>
<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>