<Collection> ->forAll(<Expression1> or <Expression2> or …)
DESCRIPTION
Returns a value of true if every<Expression> holds true for every element of <Collection>. <Collection> must be expressed as a unique alias. Multiple <Expressions> are optional, but at least one is required.
Both AND (indicated by commas between <Expressions>) and OR syntax (indicated by or between <Expressions>) is supported within the parentheses (..). However, take care to ensure invariant expressions are not inadvertently created. For example:
<Collection> -> forAll(integer1=5, integer1=8)
will always evaluate to false because no single integer1 value can be both 5AND8 simultaneously, let alone all of them.
This sample Rulesheet uses ->forAll to check for the existence of an element in collection1 whose string1 value equals New, and assigns a value to decimal1 based on the results of the test. Note the use of unique alias collection1 to represent the collection of Entity2 associated with Entity1.
SAMPLE RULETEST
A sample Ruletest provides 2 separate collections of Entity2 elements and Entity1.decimal1 values. The following illustration shows Input and Output panel