[SOLVED] Group function returning bool attribute

is there a way in our rule engine to return true/false attributes with a group.foreach?
something like

if (....&& gAColor.members.forEach[i| (i.state as HSBType).equals(weiss)]){}

so I can execute code when ALL members return true?

rule "calculate white status"
when
    Member of gAColor changed
then
    var Boolean bAllWhite = true
    if(gAColor.members.filter[m|(m.state as HSBType).equals(weiss)].size < gAColor.members.size) bAllWhite = false
end
3 Likes

Very clever @Udo_Hartmann
Nice!!!

I was thinking about something else too, but I hoped that there’s a built in function.
Anyway, you helped me out!
Thanks alot! :slight_smile: