How are classes MyObject1 and MyObject2 related? Is there a field &quot;status&quot; in each of them and/or in their common superclass?<br><br>-W<br><br><div class="gmail_quote">2010/11/9 Dennis Duggan <span dir="ltr">&lt;<a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal">I have 2 types of objects in my knowledge base that I am
trying to equate.  Equality is based on a number of different variables
contained in the objects.  Once I find equal objects I set a status member
in each to “Matched”, otherwise it will be “OneKnows”
or “TwoKnows”.</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">After I fire the rules I use queries that I call from Java
code to get the three different types of objects.</p>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">query</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">&quot;OneFirmKnows&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">    oRecord : MyObject1(
status==</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">&quot;OneKnows&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> )</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">end</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">query</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">&quot;TwoKnows&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">    oRecord : MyObject2(
status==</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">&quot;TwoKnows&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> )</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">end</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></p>

<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">query</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">&quot;Matched&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">    oRecord : MyObject1(
status==</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">&quot;Matched&quot;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> )</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal" style=""><b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">end</span></b><span style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"></span></p>


<p class="MsoNormal"> </p>

<p class="MsoNormal">Each query sends back all objects no matter what the status
is.  The objects have a getStatus( ) method.  What am I doing wrong?</p>

<p class="MsoNormal"> </p>

<p class="MsoNormal">Thanks!</p>

<p class="MsoNormal">Dennis</p>

</div>

</div>


<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br>