<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
    Thanks for the input. I've opted the second one and it's working. <br>
    Thanks for your timely support Esteban.<br>
    .<br>
    <pre class="moz-signature" cols="72"> _ _     _ _ |.    
| | ||_|| (_|||  \/

Whoever wants to be happy, let him be so: of tomorrow there's no knowing</pre>
    <br>
    On 12/27/2010 05:46 PM, Esteban Aliverti wrote:
    <blockquote
      cite="mid:AANLkTim+hdm3iU_HWkEYtY6-Qqja5w2a3ccJoo16Lyqy@mail.gmail.com"
      type="cite">You have 2 simple approaches:
      <div>
        <ol>
          <li>Insert all your Students as facts and create regular rules
            like <br>
            <i>Student(name == 'something')</i></li>
          <li>Use the <i>from</i> keyword: <br>
            <i>$c: ClassA ()<br>
              Student(name == "something") from $c.students</i><br>
            &nbsp;&nbsp;&nbsp;</li>
        </ol>
        <div>Best Regards,</div>
        <br>
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br>
        <br>
        Esteban Aliverti<br>
        - Developer @ <a moz-do-not-send="true"
          href="http://www.plugtree.com" target="_blank">http://www.plugtree.com
        </a><br>
        - Blog @ <a moz-do-not-send="true"
          href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
        <br>
        <br>
        <div class="gmail_quote">On Mon, Dec 27, 2010 at 5:23 AM, Murali
          Venugopal <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:murali.venugopal@sifycorp.com">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'm inserting an Object calld ClassA into the working
            memory. Which has got it'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; &nbsp;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'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't know to write a rule to access an Object's data
            member of type ArrayList and find a match. Please help.<br>
            <br>
            Thanks in advance.<br>
            <br>
            &nbsp;_ _ &nbsp; &nbsp; _ _ |.<br>
            | | ||_|| (_||| &nbsp;\/<br>
            <br>
            Whoever wants to be happy, let him be so: of tomorrow
            there'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 moz-do-not-send="true"
              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 &nbsp;person responsible for
            delivering the<br>
            information to the named recipient, &nbsp;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 moz-do-not-send="true"
              href="mailto:admin@sifycorp.com">admin@sifycorp.com</a><br>
            _______________________________________________<br>
            rules-users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
            <a moz-do-not-send="true"
              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>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
  </body>
</html>