Assume we have a bag of booleans. Is there a function that can tell whether the number of "true" values is larger than some constant (e.g., 5)?
I came across "n-of" function, but it requires multiple separate attributes as an input and not a bag... Maybe "map" function can help, but not sure how since I didn't find a function that can reduce the number of items in a bag.
Thanks! Michael.
To achieve what you are looking for, you need to use two functions:
booleanBagSize(someAttribute)booleanEqualsused in conjunction with a higher-order function e.g.AllOfThe resulting code in ALFA would be:
And the XACML 3.0 output would be
This approach only works if the bag only contains true values.