<!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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&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'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* "Calculate Business profit,1"* <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(" BP "+( 
    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></BLOCKQUOTE></BODY></HTML>