From FMahalakshmi at nyx.com Thu Jun 10 17:21:47 2010
Content-Type: multipart/mixed; boundary="===============2355322375729042216=="
MIME-Version: 1.0
From: Fnu Mahalakshmi
To: rules-users at lists.jboss.org
Subject: Re: [rules-users] Error using forAll() in
Date: Thu, 10 Jun 2010 17:21:34 -0400
Message-ID: <994758E35590274E955FA75763C5AA5002D010C7@MTEXMBXP01.ad.NYX.com>
In-Reply-To: mailman.3151.1276202859.13287.rules-users@lists.jboss.org
--===============2355322375729042216==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Hi,
Thanks for the prompt response.
I just broke the information into 2 separate rules and it works great.
In 1 I modified it to check if the value of B is modified then that A value=
is modified
In the 2 rule I checked if A is modified then all the Bs referencing A is m=
odified.
Removed the forAll completely.
Thanks for the help :)
-M
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces(a)l=
ists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Thursday, June 10, 2010 4:48 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 43, Issue 58
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. Error using forAll() in rules (Fnu Mahalakshmi)
2. Re: Error using forAll() in rules (Wolfgang Laun)
----------------------------------------------------------------------
Message: 1
Date: Thu, 10 Jun 2010 16:16:47 -0400
From: Fnu Mahalakshmi
Subject: [rules-users] Error using forAll() in rules
To: "'rules-users(a)lists.jboss.org'"
Message-ID:
<994758E35590274E955FA75763C5AA5002D010C6(a)MTEXMBXP01.ad.NYX.com>
Content-Type: text/plain; charset=3D"us-ascii"
Hi,
I have a list of items which I want to modify if condition turns true. I tr=
ied forall but its not working::
A{
String Name
}
B{
A a,
}
Rule " modify B if A name =3D 'bob'"
when
forall($a : A()
$b : B( a =3D=3D $a)
)
then
modify($b){
seta($a.getName())};
I have many B objects pointing to same A object and when name of A is modif=
ied I want the rule to fire and all B to also be modified.
What is wrong above???
I tried this too:
when
forall($a : A()
B( a =3D=3D $a)
)
then
modify($b){ // but then I cannot do this step.which is re=
quired
seta($a.getName())};
Any Idea???
Thank you
M
Please consider the environment before print=
ing this email.
Visit our website at http://www.=
nyse.com
***************************************************************************=
**
Note: The information contained in this message and any attachment to it i=
s privileged, confidential and protected from disclosure. If the reader of=
this message is not the intended recipient, or an employee or agent respon=
sible for delivering this message to the intended recipient, you are hereby=
notified that any dissemination, distribution or copying of this communica=
tion is strictly prohibited. If you have received this communication in er=
ror, please notify the sender immediately by replying to the message, and p=
lease delete it from your system. Thank you. NYSE Euronext.
--===============2355322375729042216==--