<div dir="ltr"><div>Continuing with this same example, How can I count the number of times a student has received an A across all the classes?<br><br></div>I can get it to trigger each time a student appears in the rosters of 2 different teachers and that student has an A in both but I can&#39;t figure out how to track it across more then that. <br>
<div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 4:50 AM, Stephen Masters <span dir="ltr">&lt;<a href="mailto:stephen.masters@me.com" target="_blank">stephen.masters@me.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just thought I&#39;d mention that I hadn&#39;t replied to this, because it looks way too much like comp-sci homework. Not sure whether that&#39;s the same reason others haven&#39;t replied either. ;)<br>

<br>
A hint though to get you started. You can probably use something like...<br>
<br>
$student: Student(grade != null) from $roster<br>
<br>
… with a few lines before that to pick out the roster in a similar fashion.<br>
<br>
To understand it, check out the Drools Expert manual for the &quot;from&quot; operator for working with lists/collections.<br>
<br>
Steve<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On 3 Apr 2013, at 19:59, burmanator &lt;<a href="mailto:alexburman@gmail.com">alexburman@gmail.com</a>&gt; wrote:<br>
<br>
&gt; So the example I am working with is this:<br>
&gt; You have a Teacher object<br>
&gt;     that stores a list of Rosters  objects<br>
&gt;           in each Roster is a list of Students objects<br>
&gt;                each Student has a grade value<br>
&gt;<br>
&gt; How would I go about creating a rule to find all the students that got As<br>
&gt; for a given Teacher across all her Rosters?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools.46999.n3.nabble.com/creating-a-rule-regarding-an-element-of-list-stored-in-an-object-in-a-list-tp4023205.html" target="_blank">http://drools.46999.n3.nabble.com/creating-a-rule-regarding-an-element-of-list-stored-in-an-object-in-a-list-tp4023205.html</a><br>

&gt; Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br>Alex Burman<br>cell: 908-672-0198
</div></div></div></div></div>