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