This works:<br><br>rule &quot;test&quot;<br>when<br>##    exists (MyClass());  ## this is redundant<br>    $l : ArrayList() from collect (MyClass (attribute == false));<br>    $r : AnotherClass();<br>then<br>    $r.doSomething( $l );<br>
    for(Object o : new ArrayList( $l )) {<br>        modify((MyClass)o) { setAttribute(true); } ;<br>    }<br>end<br><br>-W<br><br><br><br><br><div class="gmail_quote">On 31 August 2011 12:18, chocksmith <span dir="ltr">&lt;<a href="mailto:rodrigo.goncalves@coffeebeantech.com">rodrigo.goncalves@coffeebeantech.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I doesn&#39;t even compile. As o2 did not come from the LHS, I get the follow<br>
error:<br>
  The method setAttribute(boolean) is undefined for the type Object<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-Bulk-modification-tp3297162p3297952.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-Bulk-modification-tp3297162p3297952.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
</font><div><div></div><div class="h5">_______________________________________________<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>