I have 2 objects, Foo and Bar. Foo can store an instance of Bar. I am trying
to create a list of all the Bar objects that correspond to all the Foo
objects with a given name.
the line in my rule I am using is:
Foo($name : Name)
$list : List() from accumulate( Foo( Name == $name, $b : Bar != null),
collectList($b))
Yet when I print out the list, it includes null elements. But if I instead
make the rule:
$list : List() from accumulate( Foo( Name == $name, $b : Bar != null),
collectList($b!=null))
I get false for all the null Bar objects.
Am I missing something?
--
View this message in context: http://drools.46999.n3.nabble.com/having-trouble-using-accumulate-to-create-a-list-of-non-null-objects-tp4023606.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users