<div dir="ltr">Actually, il have to use this List&lt;Event&gt; in another class and then print list&lt;Event&gt; after every rule execution cycle.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 4:05 PM, Mauricio Salatino <span dir="ltr">&lt;<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can you please elaborate about why do you want to do that? what&#39;s the point of having a list inside of the Event class that will contain the same event?<div>
<br></div><div>The &quot;Then&quot; side of the rule is pure java.. so you just do </div>

<div>event.getEvents().add(event);</div><div><br></div><div>but I don&#39;t see the point of doing that.</div><div><br></div><div>Regards</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">
On Mon, Mar 10, 2014 at 10:31 AM, Sandhya Sree <span dir="ltr">&lt;<a href="mailto:sandhyachinnaraj@gmail.com" target="_blank">sandhyachinnaraj@gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">hi , <div><br></div><div>i have a class called Event which is as follows:</div>
<div><br></div><div><div>

public class Event {</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span> private  String name;</div>
<div><span style="white-space:pre-wrap">        </span> private  File source;</div><div><span style="white-space:pre-wrap">        </span> private  Date timeStamp;</div><div><span style="white-space:pre-wrap">        </span>public static List&lt;Event&gt; listOfEvents;</div>



<div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span> </div><div><span style="white-space:pre-wrap">        </span>public Event(String name, File source, Date timeStamp) {</div>
<div><span style="white-space:pre-wrap">                </span><a href="http://this.name" target="_blank">this.name</a> = name;</div><div><span style="white-space:pre-wrap">                </span>this.source = source;</div><div><span style="white-space:pre-wrap">                </span>this.timeStamp = timeStamp;</div>



<div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>public String getName() {</div>



<div><span style="white-space:pre-wrap">                </span>return name;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>public void setName(String name) {</div>
<div><span style="white-space:pre-wrap">                </span><a href="http://this.name" target="_blank">this.name</a> = name;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>public File getSource() {</div>



<div><span style="white-space:pre-wrap">                </span>return source;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>public void setSource(File source) {</div>
<div><span style="white-space:pre-wrap">                </span>this.source = source;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>public Date getTimeStamp() {</div>
<div><span style="white-space:pre-wrap">                </span>return timeStamp;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>public void setTimeStamp(Date timeStamp) {</div>



<div><span style="white-space:pre-wrap">                </span>this.timeStamp = timeStamp;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span></div><div><br></div><div>
<br></div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>public void display()</div><div><span style="white-space:pre-wrap">        </span> {</div><div><span style="white-space:pre-wrap">                </span> System.out.println(name +&quot; &quot; + &quot;in folder: &quot; + source + &quot; on &quot; + timeStamp );<span style="white-space:pre-wrap">        </span></div>



<div><span style="white-space:pre-wrap">                </span></div><div><span style="white-space:pre-wrap">        </span> }</div></div><div><br></div><div><br></div><div><br></div><div>there are also some other classes associated with my project.. i have a rules file which computes the size of a folder and creates an object of Event class. every time this object of Event class is created i wwant to put it in a List&lt;Event&gt;.. how can i do this..</div>



<div><br></div><div>my rules is as follows:</div><div><br></div><div><div>rule &quot;size&quot;</div><div>when</div><div>  $p:  RuleContext($size: getOldContext().getParent().getUsableSpace() &gt; (30*1024*1024))</div><div>



  </div><div>then</div><div>   Event event = new Event(&quot;folder almost full&quot;, $p.getOldContext().getParent(), new Date());</div><div>   event.display();</div><div>   ......here i want to put this event into the List&lt;Event&gt; declared in Event Class.....</div>



<div><br></div><div>  end</div></div><div><br></div><div><br></div><div><br></div><div>thanks,</div><div>Sandhya</div></div>
<br></div></div>_______________________________________________<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><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><div><br></div>-- <br><div dir="ltr"> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.com</a><div>

 - Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br> - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino &quot;Salaboy&quot; Mauricio -</div>


</div>
</font></span></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></blockquote></div><br></div>