<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">The rule below is doing exactly what it should.&nbsp; Here's the rule expressed in pseudo code:<br><br>when<br>&nbsp; 1) there's an object of type DroolsWorkingMemory<br>&nbsp; 2) there's an object of type BaseType<br>&nbsp; 3) there's an object of type ConcreteType1<br>&nbsp; 4) the BaseType object and ConcreteType1 object are equal<br>then<br>&nbsp; blah, blah, blah...<br>end<br><br>So if you have a single ConcreteType1 object, it fits the logical conditions of the rule.&nbsp; It's a BaseType, a ConcreteType1, and is equal to itself.<br><br>I don't quite understand your two issues, though.<br><br>--- On <b>Fri, 4/9/10, Rajnikant Gupta <i>&lt;capricorn.raj@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Rajnikant Gupta &lt;capricorn.raj@gmail.com&gt;<br>Subject: Re:
 [rules-users] Tuples in Agenda Item.<br>To: "Rules Users List" &lt;rules-users@lists.jboss.org&gt;<br>Date: Friday, April 9, 2010, 12:01 AM<br><br><div id="yiv1356759657"><font size="1">
<div align="left"><font face="arial,helvetica,sans-serif" size="2">Hi,</font></div>
<div align="left"><strong></strong>&nbsp;</div>
<div align="left"><font face="arial,helvetica,sans-serif" size="2">Sorry for not being very clear. Here's the rule which&nbsp;I run:</font></div>
<div align="left"><strong></strong>&nbsp;</div>
<div align="left"><strong></strong>&nbsp;</div>
<div align="left"><strong>package rr</strong></div>
<div align="left"><strong>import com.thirdpillar.common.util.DroolsWorkingMemoryimport com.parentchild.BaseType</strong></div>
<div align="left"><strong>import com.parentchild.ConcreteType1&nbsp;</strong></div>
<div align="left"><strong></strong>&nbsp;</div>
<div align="left"><strong>rule "s"</strong></div>
<div align="left"><strong>no-loop true </strong></div>
<div align="left"><strong>salience 999999 </strong></div>
<div align="left"><strong></strong>&nbsp;</div>
<div align="left"><strong>when</strong></div>
<div align="left"><strong>DroolsWorkingMemory:DroolsWorkingMemory()</strong></div>
<div align="left"><strong>BaseType:BaseType()</strong></div>
<div align="left"><strong>ConcreteType1:ConcreteType1()</strong></div>
<div align="left"><strong>eval (</strong></div>
<div align="left"><strong>(</strong></div>
<div align="left"><strong>((BaseType.equals(ConcreteType1)))</strong></div>
<div align="left"><strong>)</strong></div>
<div align="left"><strong>)</strong></div>
<div align="left"><strong>then</strong></div>
<div align="left"><strong>BaseType.setString("Blah Blah!");</strong></div>
<div align="left"><strong>end </strong></div></font>
<div>&nbsp;</div>
<div><font face="arial,helvetica,sans-serif">where <strong>ConcreteType1 </strong>extends </font><strong><font face="arial,helvetica,sans-serif">BaseType.</font>&nbsp;</strong></div>
<div><strong></strong>&nbsp;</div>
<div><u>Issues:</u></div>
<div>1.&nbsp;Even for different values for fields in <strong>ConcreteType1</strong> and <strong>BaseType, </strong>the rule gets fired. </div>
<div>&nbsp;</div>
<div>2. I also do audit for the rules for which i need tuples so that I can extract the objects out of it and evaluate the expression against Mvel. But the tuple shows me only the <strong>ConcreteType1</strong> instance not the <strong>BaseType. </strong>Thus getting wrong audit.</div>

<div><br clear="all">Regards,<br><br>Rajnikant Gupta<br>Sr. Software Engineer<br>GlobalLogic,Noida<br>09899530562<br><br><a rel="nofollow" target="_blank" href="http://rkthinks.wordpress.com/">http://rkthinks.wordpress.com/</a><br><br><br></div>
<div class="gmail_quote">2010/4/9 Greg Barton <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:greg_barton@yahoo.com" target="_blank" href="/mc/compose?to=greg_barton@yahoo.com">greg_barton@yahoo.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="padding-left: 1ex; margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204);">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="top">We need some rule code to get a better idea of what's going on.&nbsp; Can you post some?<br><br>--- On <b>Thu, 4/8/10, Rajnikant Gupta <i>&lt;<a rel="nofollow" ymailto="mailto:capricorn.raj@gmail.com" target="_blank" href="/mc/compose?to=capricorn.raj@gmail.com">capricorn.raj@gmail.com</a>&gt;</i></b> wrote:<br>

<blockquote style="padding-left: 5px; margin-left: 5px; border-left: 2px solid rgb(16, 16, 255);"><br>From: Rajnikant Gupta &lt;<a rel="nofollow" ymailto="mailto:capricorn.raj@gmail.com" target="_blank" href="/mc/compose?to=capricorn.raj@gmail.com">capricorn.raj@gmail.com</a>&gt;<br>Subject: [rules-users] Tuples in Agenda Item.<br>
To: <a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>Date: Thursday, April 8, 2010, 1:36 PM 
<div>
<div></div>
<div class="h5"><br><br>
<div>
<div>&nbsp;</div>
<div>Hi,</div>
<div>&nbsp;<br>I have a doubt regarding tuples. I created a rule using complex types objects. I am comparing two complex type objecs which have parent-child relationship eg. "ParentType.equals(ChildType)". I expect this to follow java rule which allows such comparision. Now when I run the rules with different values for fields in ParentType and ChildType (which means the rule should fail) to my surprise it evals to TRUE. Also upon inspection, the tuple shows me only the ChildType instance not the ParentType. <br>
&nbsp;<br>I would appreciate any help on this.</div>
<div>&nbsp;</div>
<div><br clear="all">Regards,<br><br>Rajnikant</div></div><br></div></div>-----Inline Attachment Follows-----<br><br>
<div>_______________________________________________<br>rules-users mailing list<br><a rel="nofollow" target="_blank" href="http://mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></blockquote></td></tr></tbody></table><br><br>_______________________________________________<br>rules-users mailing list<br><a rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="/mc/compose?to=rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>