Since the list is not a Fact there is no reason to modify it. And because the list will always have 1 value, you can modify it accessing it by its index (0).<br><br><div class="gmail_quote">2010/4/20 Jörg Herbst <span dir="ltr"><<a href="mailto:herbsthannover@googlemail.com">herbsthannover@googlemail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br><br>I'm trying to change the result of a collect operation, is this possible?<br><br>This is my sample rule:<br>
<br> rule "Select the only remaining value for each feature Key"<br>
when<br> # Check all not selected features<br> feature : ExpertFeature(selected==false)<br> # if there is one enable feature select this one<br>
list : ArrayList (size == 1) from collect( ExpertFeature(disabled == false, featureKey==feature.featureKey, selected==false) ) <br> then<br> # this is not working<br>
modify( list ) {setSelected(true);}<br> end<br><br>Thanks<br>Joerg<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>
<br></blockquote></div><br><br clear="all"><br>-- <br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>