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(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users