Thanks a lot, this way is much more easier and works just as I wanted!<br><br><div class="gmail_quote">2010/4/20 Wolfgang Laun <span dir="ltr">&lt;<a href="mailto:wolfgang.laun@gmail.com">wolfgang.laun@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I think that there is a simpler way of picking the single<br>
ExpertFeature of some featureKey that is not selected and not<br>
disabled.<br>
<br>
when<br>
   candidate : ExpertFeature( selected == false, fk : featureKey,<br>
disabled == false )<br>
   not( ExpertFeature( this != candidate, featureKey == fk, selected<br>
== false ) )<br>
then<br>
   modify( candidate ){<br>
      setSelected( true )<br>
   }<br>
<br>
-W<br>
<br>
2010/4/20 Jörg Herbst &lt;<a href="mailto:herbsthannover@googlemail.com">herbsthannover@googlemail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m trying to change the result of a collect operation, is this possible?<br>
&gt;<br>
&gt; This is my sample rule:<br>
&gt;<br>
&gt;                                 rule &quot;Select the only remaining value for<br>
&gt; each feature Key&quot;<br>
&gt;                                  when<br>
&gt;                                     # Check all not selected features<br>
&gt;                                     feature : ExpertFeature(selected==false)<br>
&gt;                                     # if there is one enable feature select<br>
&gt; this one<br>
&gt;                                     list : ArrayList (size == 1) from<br>
&gt; collect( ExpertFeature(disabled == false, featureKey==feature.featureKey,<br>
&gt; selected==false) )<br>
&gt;                                  then<br>
&gt;                                       # this is not working<br>
&gt;                                       modify( list ) {setSelected(true);}<br>
&gt;                                  end<br>
&gt;<br>
&gt; Thanks<br>
&gt; Joerg<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&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>
&gt;<br>
&gt;<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>