Hi guys,
I want to work out a one to many relationship in my rules
I have 2 classes:
A{
ArrayList<B>blist;
status
}
B{
Status}
If A points to {B1,B2,B3}
If B1 exists in A then B1 status = on and A status is on
And B2, B3 status is updated to on as it is also associated with A
I am unable to depict this in my rules.
How can I traverse through lists in my rules.
I tried this::
when
$a : A()
$b : bList from $A.ipList
exists (B( status == "on") from $b)
then
modify ($a) {setStatus("on")};
end
But above doesn't work. I guess its because $b is just a variable and I am passing a
list.
But not knowing how to do it.
Please help!!! Or is there any other way to go about it???
Thank you.
M
</pre>
<P><hr size=1></P>
<P><STRONG><font color=green>Please consider the environment before
printing this email.</font></STRONG></P>
<P><STRONG>Visit our website at <a
href="http://www.nyse.com">http://www.nyse.com</a> <br>
*****************************************************************************
<br>
Note: The information contained in this message and any attachment to it is privileged,
confidential and protected from disclosure. If the reader of this message is not the
intended recipient, or an employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have received this
communication in error, please notify the sender immediately by replying to the message,
and please delete it from your system. Thank you. NYSE Euronext.
</STRONG></P><pre>
Show replies by date