As a reminder, if you need to know the ClassA to which the Student belongs you&#39;ll need to make the association to avoid cross-products:-<br><br>when<br>$s : Student( )<br>$c : ClassA( students contains $s )<br>then<br>
...<br><br><div class="gmail_quote">2010/12/27 Esteban Aliverti <span dir="ltr">&lt;<a href="mailto:esteban.aliverti@gmail.com">esteban.aliverti@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
You have 2 simple approaches:<div><ol><li>Insert all your Students as facts and create regular rules like <br><i>Student(name == &#39;something&#39;)</i></li><li>Use the <i>from</i> keyword: <br><i>$c: ClassA ()<br>Student(name == &quot;something&quot;) from $c.students</i><br>


   </li></ol><div>Best Regards,</div><br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><font color="#888888"><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>
- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a></font><div><div></div><div class="h5"><br>


<br><br><div class="gmail_quote">On Mon, Dec 27, 2010 at 5:23 AM, Murali Venugopal <span dir="ltr">&lt;<a href="mailto:murali.venugopal@sifycorp.com" target="_blank">murali.venugopal@sifycorp.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Hi,<br>
<br>
I&#39;m inserting an Object calld ClassA into the working memory. Which has got it&#39;s students in an ArrayList<br>
<br>
Like this...<br>
<br>
public class ClassA {<br>
<br>
private String RoomNo;<br>
private ArrayList&lt;Student&gt;  students;<br>
<br>
...<br>
<br>
}<br>
<br>
public class Student {<br>
<br>
private String name;<br>
private String rollNo;<br>
<br>
...<br>
<br>
}<br>
<br>
Now, i&#39;ve to write a rule to find a particular student with his role number and fetch his name to make some decisions.<br>
<br>
I don&#39;t know to write a rule to access an Object&#39;s data member of type ArrayList and find a match. Please help.<br>
<br>
Thanks in advance.<br>
<br>
  _ _     _ _ |.<br>
| | ||_|| (_|||  \/<br>
<br>
Whoever wants to be happy, let him be so: of tomorrow there&#39;s no knowing<br>
<br>
<br>
<br>
Get your world in your inbox!<br>
<br>
Mail, widgets, documents, spreadsheets, organizer and much more with your Sifymail WIYI id!<br>
Log on to <a href="http://www.sify.com" target="_blank">http://www.sify.com</a><br>
<br>
********** DISCLAIMER **********<br>
Information contained and transmitted by this E-MAIL is proprietary to<br>
Sify Limited and is intended for use only by the individual or entity to<br>
which it is addressed, and may contain information that is privileged,<br>
confidential or exempt from disclosure under applicable law. If this is a<br>
forwarded message, the content of this E-MAIL may not have been sent with<br>
the authority of the Company. If you are not the intended recipient, an<br>
agent of the intended recipient or a  person responsible for delivering the<br>
information to the named recipient,  you are notified that any use,<br>
distribution, transmission, printing, copying or dissemination of this<br>
information in any way or in any manner is strictly prohibited. If you have<br>
received this communication in error, please delete this mail &amp; notify us<br>
immediately at <a href="mailto:admin@sifycorp.com" target="_blank">admin@sifycorp.com</a><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">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></div></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>