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

Jörg Herbst herbsthannover at googlemail.com
Fri Apr 23 03:00:18 EDT 2010


Thanks a lot, this way is much more easier and works just as I wanted!

2010/4/20 Wolfgang Laun <wolfgang.laun at gmail.com>

> 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
> >
> >
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100423/b1b15273/attachment.html 


More information about the rules-users mailing list