<br>    Read the manual. Look for &quot;from&quot; CE.<br><br>    []s<br>    Edson<br><br><div class="gmail_quote">2009/7/9 Ashok Deivasigamani <span dir="ltr">&lt;<a href="mailto:ashokdeiva@gmail.com">ashokdeiva@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>I have a Message Object which has a Attribute Object which has a ArrayList of AttributeParams Objects. How can I iterate through the ArrayList to get to a perticular AttributeParans Object in the drl file. <br>

<br>The java representation of these Objects are as Follows <br><br>Class Message { <br>    private Attributes attributes; <br>} <br><br>Class Attributes { <br>    private ArrayList&lt;AttributeParams&gt; attributeParams; <br>

} <br><br>Class AttributeParsms { <br>   private String name; <br>} <br></div>


<div> </div>
<div>This is my drl file, <br>when <br>        m : Message( myAttributes : attributes) <br>then <br>        System.out.println(myAttributes); <br>        System.out.println(myAttributes.getAttributeParams()); <br>        System.out.println( myMessage ); <br>

<br>when I fire my rule, this is the output I am getting. <br><br>com.sample.Attributes@39c639c6 <br>[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac] <br><br>From the result we can see that we have two Attribute objects in the ArrayList. <br>

How can I iterate through the ArrayList to get a perticular AttributeParams object <br>This is my drl file, <br>when <br>        m : Message( myAttributes : attributes) <br>then <br>        System.out.println(myAttributes); <br>

        System.out.println(myAttributes.getAttributeParams()); <br>        System.out.println( myMessage ); <br><br>when I fire my rule, this is the output I am getting. <br><br>com.sample.Attributes@39c639c6 <br>[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac] <br>

<br>From the result we can see that we have two Attribute objects in the ArrayList. <br>How can I iterate through the ArrayList to get a perticular AttributeParams object <br><br clear="all"></div>
<div></div><br>-- <br><font color="#888888">Ashok Deivasigamani<br>
</font><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><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>