The correct syntax is<br><br>modify( $oRecord1 ) { setStatus( &quot;Matched&quot; ) };<br><br><div class="gmail_quote">On 9 November 2010 22:06, Dennis Duggan <span dir="ltr">&lt;<a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Wolfgang:<br>
In the rule??<br>
<br>
rule &quot;Match&quot;<br>
     when<br>
         $oRecord1 : MyObject1( )<br>
         $oRecord2 : MyObject2(RefID==$oRecord1. RefID )<br>
       then<br>
          $oRecord1.setStatus( &quot;Matched&quot; );<br>
          $oRecord2.setStatus( &quot;Matched&quot; );<br>
       modify ( $oRecord1 ) { status = &quot;Matched&quot; };<br>
       modify ( $oRecord2 ) { status = &quot;Matched&quot; };<br>
end<br>
<br>
I get an error...<br>
__obj__.status cannot be resolved or is not a field<br>
<br>
Doesn&#39;t the setStatus calls just above update the object?<br>
<br>
Thanks!<br>
Dennis<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a> [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>] On Behalf Of <a href="mailto:rules-users-request@lists.jboss.org">rules-users-request@lists.jboss.org</a><br>

Sent: Tuesday, November 09, 2010 3:39 PM<br>
To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
Subject: rules-users Digest, Vol 48, Issue 34<br>
<br>
Send rules-users mailing list submissions to<br>
        <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:rules-users-request@lists.jboss.org">rules-users-request@lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:rules-users-owner@lists.jboss.org">rules-users-owner@lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of rules-users digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Query query... (Dennis Duggan)<br>
   2. Re: Query query... (Wolfgang Laun)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 9 Nov 2010 14:13:07 -0600<br>
From: Dennis Duggan &lt;<a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a>&gt;<br>
Subject: Re: [rules-users] Query query...<br>
To: &quot;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&quot; &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:121AF5D37A73F94E98B26D237302319E010A76863B@MBX04.exg5.exghost.com">121AF5D37A73F94E98B26D237302319E010A76863B@MBX04.exg5.exghost.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
<br>
I have a super interface, that both objects implement.<br>
<br>
The matching rule looks like:<br>
rule &quot;Match&quot;<br>
    when<br>
        $oRecord1 : MyObject1( )<br>
        $oRecord2 : MyObject2(RefID==$oRecord1. RefID )<br>
      then<br>
         $oRecord1.setStatus( &quot;Matched&quot; );<br>
         $oRecord2.setStatus( &quot;Matched&quot; );<br>
end<br>
<br>
I can breakpoint right after running the query and I see objects with all statuses so the matching rule is firing correctly.<br>
<br>
Thanks!<br>
Dennis<br>
Dennis Duggan<br>
Principal Software Engineer, Software Engineering<br>
ESP Technologies Corp. &quot;THE Buy-Side Solution&quot;<br>
One Indian Head Plaza Suite 701, Nashua, NH 03060<br>
603.324.2444 ext. 1304 Office |  603.324.2447 Fax<br>
<a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a><br>
<br>
ESP Technologies, winner 2009 Red Herring North America 100 and 2008 Deloitte Technology Fast 500.<br>
This e-mail and/or attachments may contain privileged, confidential or proprietary information.  Unintended recipients should notify the sender immediately and delete. Disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. Brokerage services provided by Electronic Securities Processing (ESP) LLC. Member FINRA, SIPC. This is neither an offer or recommendation to buy or sell any security or other financial instrument.  Email <a href="mailto:compliance@esptechnologies.com">compliance@esptechnologies.com</a> with questions regarding this disclosure.<br>

<br>
From: Dennis Duggan<br>
Sent: Tuesday, November 09, 2010 1:55 PM<br>
To: &#39;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&#39;<br>
Subject: Query query...<br>
<br>
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 &quot;Matched&quot;, otherwise it will be &quot;OneKnows&quot; or &quot;TwoKnows&quot;.<br>

<br>
After I fire the rules I use queries that I call from Java code to get the three different types of objects.<br>
query &quot;OneFirmKnows&quot;<br>
    oRecord : MyObject1( status==&quot;OneKnows&quot; )<br>
end<br>
<br>
query &quot;TwoKnows&quot;<br>
    oRecord : MyObject2( status==&quot;TwoKnows&quot; )<br>
end<br>
<br>
query &quot;Matched&quot;<br>
    oRecord : MyObject1( status==&quot;Matched&quot; )<br>
end<br>
<br>
Each query sends back all objects no matter what the status is.  The objects have a getStatus( ) method.  What am I doing wrong?<br>
<br>
Thanks!<br>
Dennis<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-users/attachments/20101109/ef70b469/attachment-0001.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/attachments/20101109/ef70b469/attachment-0001.html</a><br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 9 Nov 2010 21:38:56 +0100<br>
From: Wolfgang Laun &lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;<br>
Subject: Re: [rules-users] Query query...<br>
To: Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:AANLkTikxs%2B9XhVj2XNQzKDRFAgVa2Mai3fgBFFLtLaNM@mail.gmail.com">AANLkTikxs+9XhVj2XNQzKDRFAgVa2Mai3fgBFFLtLaNM@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;windows-1252&quot;<br>
<br>
You don&#39;t call modify or update on $oRecord1/$oRecord2!<br>
-W<br>
<br>
<br>
<br>
2010/11/9 Dennis Duggan &lt;<a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a>&gt;<br>
<br>
&gt;  I have a super interface, that both objects implement.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; The matching rule looks like:<br>
&gt;<br>
&gt; *rule* &quot;Match&quot;<br>
&gt;<br>
&gt;     *when*<br>
&gt;<br>
&gt;         $oRecord1 : MyObject1( )<br>
&gt;<br>
&gt;         $oRecord2 : MyObject2(RefID==$oRecord1. RefID )<br>
&gt;<br>
&gt;       *then*<br>
&gt;<br>
&gt;          $oRecord1.setStatus( &quot;Matched&quot; );<br>
&gt;<br>
&gt;          $oRecord2.setStatus( &quot;Matched&quot; );<br>
&gt;<br>
&gt; *end*<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I can breakpoint right after running the query and I see objects with all<br>
&gt; statuses so the matching rule is firing correctly.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks!<br>
&gt; Dennis<br>
&gt;<br>
&gt; Dennis Duggan<br>
&gt;<br>
&gt; Principal Software Engineer, Software Engineering<br>
&gt;<br>
&gt; ESP Technologies Corp. &quot;THE Buy-Side Solution*&quot;*<br>
&gt;<br>
&gt; One Indian Head Plaza Suite 701, Nashua, NH 03060<br>
&gt;<br>
&gt; 603.324.2444 ext. 1304 Office |  603.324.2447 Fax<br>
&gt;<br>
&gt; <a href="mailto:dennis@esptechnologies.com">dennis@esptechnologies.com</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; *ESP Technologies, winner 2009 Red Herring North America 100 and 2008<br>
&gt; Deloitte Technology Fast 500*.**<br>
&gt;<br>
&gt; This e-mail and/or attachments may contain privileged, confidential or<br>
&gt; proprietary information.  Unintended recipients should notify the sender<br>
&gt; immediately and delete. Disclosure, copying, distribution or use of this<br>
&gt; e-mail or any attachment is prohibited. Brokerage services provided by<br>
&gt; Electronic Securities Processing (ESP) LLC. Member FINRA, SIPC. This is<br>
&gt; neither an offer or recommendation to buy or sell any security or other<br>
&gt; financial instrument.  Email <a href="mailto:compliance@esptechnologies.com">compliance@esptechnologies.com</a> with questions<br>
&gt; regarding this disclosure.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; *From:* Dennis Duggan<br>
&gt; *Sent:* Tuesday, November 09, 2010 1:55 PM<br>
&gt; *To:* &#39;<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>&#39;<br>
&gt; *Subject:* Query query...<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I have 2 types of objects in my knowledge base that I am trying to equate.<br>
&gt; Equality is based on a number of different variables contained in the<br>
&gt; objects.  Once I find equal objects I set a status member in each to<br>
&gt; ?Matched?, otherwise it will be ?OneKnows? or ?TwoKnows?.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; After I fire the rules I use queries that I call from Java code to get the<br>
&gt; three different types of objects.<br>
&gt;<br>
&gt; *query* &quot;OneFirmKnows&quot;<br>
&gt;<br>
&gt;     oRecord : MyObject1( status==&quot;OneKnows&quot; )<br>
&gt;<br>
&gt; *end*<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; *query* &quot;TwoKnows&quot;<br>
&gt;<br>
&gt;     oRecord : MyObject2( status==&quot;TwoKnows&quot; )<br>
&gt;<br>
&gt; *end*<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; *query* &quot;Matched&quot;<br>
&gt;<br>
&gt;     oRecord : MyObject1( status==&quot;Matched&quot; )<br>
&gt;<br>
&gt; *end*<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Each query sends back all objects no matter what the status is.  The<br>
&gt; objects have a getStatus( ) method.  What am I doing wrong?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; Dennis<br>
&gt;<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/rules-users/attachments/20101109/3712f2f4/attachment.html" target="_blank">http://lists.jboss.org/pipermail/rules-users/attachments/20101109/3712f2f4/attachment.html</a><br>

<br>
------------------------------<br>
<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>
<br>
End of rules-users Digest, Vol 48, Issue 34<br>
*******************************************<br>
<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>
</blockquote></div><br>