Resource rules have been defined for specific transactions. Those transactions also appear in X(RGP) Records.
1.) In what order will the rules be searched?
2.) Which rule takes precedence?
ACF2 R16.0
Rules for specific transactions are searched first. If a resource rule that matches the validation request is found it will be used.
If no matching rule is found for the specific transaction, then ACF2 will search the X(RGP) Records for one that contains that transaction and validate using the X(RGP) record ID as the resource name.
For example, if there is a rule for $KEY(ABCD) and a rule for the X(RGP) record ALPHA that contains ABCD, then ACF2 will try for a match on the $KEY(ABCD) first. If there is no matching rule line in that rule set ACF2 will move on to look at the X(RGP) records that contain ABCD. At that point, it's now validating against the resource name ALPHA, not ABCD.