Wolfgang:
In the rule??
rule "Match"
when
$oRecord1 : MyObject1( )
$oRecord2 : MyObject2(RefID==$oRecord1. RefID )
then
$oRecord1.setStatus( "Matched" );
$oRecord2.setStatus( "Matched" );
modify ( $oRecord1 ) { status = "Matched" };
modify ( $oRecord2 ) { status = "Matched" };
end
I get an error...
__obj__.status cannot be resolved or is not a field
Doesn't the setStatus calls just above update the object?
Thanks!
Dennis
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On
Behalf Of rules-users-request(a)lists.jboss.org
Sent: Tuesday, November 09, 2010 3:39 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 48, Issue 34
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Query query... (Dennis Duggan)
2. Re: Query query... (Wolfgang Laun)
----------------------------------------------------------------------
Message: 1
Date: Tue, 9 Nov 2010 14:13:07 -0600
From: Dennis Duggan <dennis(a)esptechnologies.com>
Subject: Re: [rules-users] Query query...
To: "rules-users(a)lists.jboss.org" <rules-users(a)lists.jboss.org>
Message-ID:
<121AF5D37A73F94E98B26D237302319E010A76863B(a)MBX04.exg5.exghost.com>
Content-Type: text/plain; charset="us-ascii"
I have a super interface, that both objects implement.
The matching rule looks like:
rule "Match"
when
$oRecord1 : MyObject1( )
$oRecord2 : MyObject2(RefID==$oRecord1. RefID )
then
$oRecord1.setStatus( "Matched" );
$oRecord2.setStatus( "Matched" );
end
I can breakpoint right after running the query and I see objects with all statuses so the
matching rule is firing correctly.
Thanks!
Dennis
Dennis Duggan
Principal Software Engineer, Software Engineering
ESP Technologies Corp. "THE Buy-Side Solution"
One Indian Head Plaza Suite 701, Nashua, NH 03060
603.324.2444 ext. 1304 Office | 603.324.2447 Fax
dennis(a)esptechnologies.com
ESP Technologies, winner 2009 Red Herring North America 100 and 2008 Deloitte Technology
Fast 500.
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 compliance(a)esptechnologies.com with questions regarding this
disclosure.
From: Dennis Duggan
Sent: Tuesday, November 09, 2010 1:55 PM
To: 'rules-users(a)lists.jboss.org'
Subject: Query query...
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".
After I fire the rules I use queries that I call from Java code to get the three different
types of objects.
query "OneFirmKnows"
oRecord : MyObject1( status=="OneKnows" )
end
query "TwoKnows"
oRecord : MyObject2( status=="TwoKnows" )
end
query "Matched"
oRecord : MyObject1( status=="Matched" )
end
Each query sends back all objects no matter what the status is. The objects have a
getStatus( ) method. What am I doing wrong?
Thanks!
Dennis