[rules-users] Expert: Modify the result of a collect Operation

Wolfgang Laun wolfgang.laun at gmail.com
Tue Apr 20 13:53:50 EDT 2010


I think that there is a simpler way of picking the single
ExpertFeature of some featureKey that is not selected and not
disabled.

when
   candidate : ExpertFeature( selected == false, fk : featureKey,
disabled == false )
   not( ExpertFeature( this != candidate, featureKey == fk, selected
== false ) )
then
   modify( candidate ){
      setSelected( true )
   }

-W

2010/4/20 Jörg Herbst <herbsthannover at googlemail.com>:
> Hi,
>
> I'm trying to change the result of a collect operation, is this possible?
>
> This is my sample rule:
>
>                                 rule "Select the only remaining value for
> each feature Key"
>                                  when
>                                     # Check all not selected features
>                                     feature : ExpertFeature(selected==false)
>                                     # if there is one enable feature select
> this one
>                                     list : ArrayList (size == 1) from
> collect( ExpertFeature(disabled == false, featureKey==feature.featureKey,
> selected==false) )
>                                  then
>                                       # this is not working
>                                       modify( list ) {setSelected(true);}
>                                  end
>
> Thanks
> Joerg
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>




More information about the rules-users mailing list