<div dir="ltr"><div>Definitely a bug - please raise a JIRA with the trimmings.<br></div>-W<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 1 May 2013 15:18, burmanator <span dir="ltr">&lt;<a href="mailto:alexburman@gmail.com" target="_blank">alexburman@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">I have 2 objects, Foo and Bar. Foo can store an instance of Bar. I am trying<br>
to create a list of all the Bar objects that correspond to all the Foo<br>
objects with a given name.<br>
<br>
the line in my rule I am using is:<br>
<br>
Foo($name : Name)<br>
<br>
$list : List() from accumulate( Foo( Name == $name, $b : Bar != null),<br>
collectList($b))<br>
<br>
Yet when I print out the list, it includes null elements. But if I instead<br>
make the rule:<br>
<br>
$list : List() from accumulate( Foo( Name == $name, $b : Bar != null),<br>
collectList($b!=null))<br>
<br>
I get false for all the null Bar objects.<br>
<br>
Am I missing something?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/having-trouble-using-accumulate-to-create-a-list-of-non-null-objects-tp4023606.html" target="_blank">http://drools.46999.n3.nabble.com/having-trouble-using-accumulate-to-create-a-list-of-non-null-objects-tp4023606.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<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>