-
Notifications
You must be signed in to change notification settings - Fork 2
rule group
Ryan Newington edited this page Jun 6, 2016
·
1 revision
Multiple rules can be grouped together in a <rule-group> with an overall group operator that evaluates the results of the child <rule> and <rule-group> objects and determines if the group itself is successful.
The <rule-group> must contain the following attributes;
| XML Attribute | Description | Allowed Values |
|---|---|---|
| id | The unique ID for the rule. This is used to reference the rule in the [[command | commands]] object |
| operator | The group evaluation operator | See [[group evaluation operators |
The <rule-group> must contain one or more of the following elements; |
- rule
- rule-group
-
rule-ref
Children of the rule group are evaluated in the order they appear. The MA performs 'shortcut' evaluation, evaluating rules only if they are needed. For example, if a
<rule-group>element has a group-operator ofNone, and the first child object passes evaluation, the MA does not process the remaining rules in the group, and immediately returns an evaluation failure.
<rule-group id="GroupMemberOrAccountNameModified" operator="Or">
<rule xsi:type="sshma:rule-AttributeChangeRule" id="groupMemberModified" attribute="member" triggers="Add,Update"/>
<rule xsi:type="sshma:rule-AttributeChangeRule" id="groupAccountNameModified" attribute="accountName" triggers="Add,Update"/>
</rule-group>
The example above shows a rule group contains two rules, one to determine if the member attribute has been added or updated, and another to determine if the accountName attribute has been added or updated. The group has an operator of Or which means that if any of the rules within the group evaluate successfully, then the group itself evaluates successfully.