<p>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. </p>
<p>The java representation of these Objects are as Follows </p>
<p>Class Message { <br> private Attributes attributes; <br>} </p>
<p>Class Attributes { <br> private ArrayList<AttributeParams> attributeParams; <br>} </p>
<p>Class AttributeParsms { <br> private String name; <br>} </p>
<p><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 ); </p>
<p>when I fire my rule, this is the output I am getting. </p>
<p><a href="mailto:com.sample.Attributes@39c639c6">com.sample.Attributes@39c639c6</a> <br>[com.sample.AttributeParams@39a639a6, <a href="mailto:com.sample.AttributeParams@39ac39ac">com.sample.AttributeParams@39ac39ac</a>] </p>
<p>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"></p>
<div></div><br>-- <br>Ashok Deivasigamani<br>