<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=648040214-18072007><FONT face=Arial
color=#0000ff size=2>Hi Natraj,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=648040214-18072007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=648040214-18072007></SPAN><FONT
face=Arial><FONT color=#0000ff><FONT size=2>I<SPAN class=648040214-18072007>n
your particular case I think the problem is caused by a cross-product setting in
Drools.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007>I think, in older versions two patterns using the same
Object type, expect it to be the same (by reference) whereas in newer versions
(by default) the objects are different.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007>I think there might be a setting to control this
behaviour (in the older version). Edson, Mark - I can't remember the specifics.
Any ideas to avoid a search of the newsgroup?</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007>Lots of thinking!</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007>With kind regards,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=648040214-18072007>Mike</SPAN></FONT></FONT></FONT></DIV>
<DIV dir=ltr align=left><BR></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Natraj
Gudla<BR><B>Sent:</B> 18 July 2007 14:54<BR><B>To:</B> gs@gernotstarke.de;
Rules Users List<BR><B>Subject:</B> Re: [rules-users] Another
problem<BR></FONT><BR></DIV>
<DIV></DIV>
<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></BLOCKQUOTE></BODY></HTML>