After adding attribute rules to the data, the evaluation process reviews the rules on the data to ensure rules are followed. The evaluation method used depends on the rule type and properties. Immediate evaluation rules are evaluated immediately during an edit operation, while deferred evaluation rules are evaluated at a specified time using the validation service as follows:
- Immediate evaluation
- Immediate calculation rules
- Constraint rules
- Deferred evaluation
- Batch calculation rules
- Validation rules
Dive-in:
Edits made by the Update Subnetwork or Update Is Connected tools in a utility network may bypass geodatabase behavior and will not prompt the immediate evaluation of attribute rules. See Update subnetworks and Identify isolated features for more information.
Immediate evaluation during editing
Immediate calculation and constraint rules are automatically evaluated with edit operations such as insert, update, or delete. The specific edit operation that prompts evaluation is defined in triggering events of the rule properties. To review the rule properties, see Attribute Rules view.
When you edit data in ArcGIS Pro or through a feature service, these rules are evaluated. Calculation rules either automatically populate fields or return an error message when the calculation expression fails. Constraint rules return an error message for rule violations. As edits are made, immediate calculation rules are evaluated first, followed by constraint rules. Any default values are set on features before evaluating these rules.
Immediate calculation and constraint rules have an Exclude from application evaluation option in the rule properties that affects evaluation during feature service editing. If you're editing the feature service in ArcGIS Pro, you can uncheck the Exclude from application evaluation option when you create rules, and the rules will evaluate locally before apply edit requests are sent to the server.
Note:
The Exclude from application evaluation option must be true for immediate calculation rules if the Arcade expression returns specific attribute rule dictionary keywords or uses sequences.Deferred evaluation using the validation service
Batch calculation and validation rules are evaluated at a user-specified time using the Error Inspector or the Evaluate Rules tool. To evaluate rules using the Error Inspector or the Evaluate Rules tool, the dataset and error layers must be accessed from a web feature layer that has the validation capability enabled. Once the validation service is available, you choose when to evaluate the rules, which will review the rules for the existing set of data.
See Share datasets with attribute rules for more information.
During evaluation, a batch calculation rule will automatically populate fields or create error features when calculation expressions fail, and a validation rule will create error features that highlight features violating rules. If both rule types are evaluated simultaneously, the batch calculation rules are evaluated first, followed by the validation rules. Error features for these rules can be reviewed through the Error Inspector.
Note:
The Validation capability used to evaluate batch calculation and validation rules is only available when sharing to ArcGIS Enterprise 10.7 or later. See Considerations when sharing to older portals for more information.Validation Status attribute
The evaluation of batch calculation and validation rules is tracked by the Validation Status field in the dataset. The Validation Status field is added when the first batch calculation or validation rule is created for the dataset. The field reports the following information for each feature:
- Does the feature require calculation?
- Does the feature require validation?
- Does the feature have errors?
A feature must be set to calculation required or validation required for the evaluation to review the rules on the feature. The Validation Status field is updated when the feature is edited, during evaluation, or when a new batch calculation or validation rule is added to the dataset. When a batch calculation rule or validation rule is added to a dataset, the validation status is reset to require evaluation for all features. For example, when adding a batch calculation and validation rule to a dataset, the validation status of No calculation required, no validation required, no error is updated to Calculation required, validation required, no error.
Code | Description |
---|---|
0 | No calculation required, no validation required, no error |
1 | No calculation required, no validation required, has error(s) |
2 | No calculation required, validation required, no error |
3 | No calculation required, validation required, has error(s) |
4 | Calculation required, no validation required, no error |
5 | Calculation required, no validation required, has error(s) |
6 | Calculation required, validation required, no error |
7 | Calculation required, validation required, has error(s) |
Error layers
To evaluate batch calculation and validation rules with the Error Inspector, use the Add Error Layers option to add layers to your map. This adds a group layer of the error datasets from the feature service.
The error layers group layer is comprised of the following datasets:
- GDB_ValidationPointErrors
- GDB_ValidationLineErrors
- GDB_ValidationPolygonErrors
- GDB_ValidationObjectErrors
The Add Error Layers option is only available after sharing the four error datasets as part of a web feature layer that has Validation capabilities enabled. The error layers group layer is used as the source in the Error Inspector to evaluate rules and review error features.
The error datasets are created when the first batch calculation or validation rule is created in a geodatabase. These are used to store all error features created during rule evaluation.
Evaluate rules using the Error Inspector
You can evaluate batch calculation and validation rules using the Error Inspector in ArcGIS Pro. Before completing the steps below, the datasets and associated error datasets must be shared as a web feature layer with the Validation capability enabled. See Share datasets with attribute rules for more information.
- In the Catalog pane, click the Portal tab.
- Locate and double-click the web feature layer containing the data to evaluate.
- Right-click the individual layer or layers and click Add to New > Map or Add to Current Map .
- In the Contents pane, right-click the layer, and click Add Error Layers .
The associated error layers are added as a single group layer, which will be used to evaluate rules in the Error Inspector.
- On the Edit tab, in the Manage Edits group, click Error Inspector .
On the Error Inspector toolbar, the Source option references the error layers in the map view.
- Optionally, click the Source drop-down button and choose the error layer to change the value.
- On the Evaluate Rules button , click the drop-down arrow to expand the options for evaluating rules.
- For Rule Type, choose at least one to evaluate.
- Batch Calculation Rules
- Validation Rules
- For Extent, choose one of the options.
- Visible extent—Evaluate the visible extent of the map.
- Full extent—Evaluate the full extent of the feature service.
- For Options, choose any of the following:
- Modified in this branch—Evaluate edits made in the current branch version. This option is not available when evaluating rules using the default version.
- Execute asynchronously—Execute the evaluate rules on the service asynchronously. This uses the system ValidationTools geoprocessing service, which allows for long-running processes.
- For Rule Type, choose at least one to evaluate.
- When you're finished, click the drop-down button to collapse the options.
- Click the Evaluate Rules button .
Error features are created and displayed in the Error Inspector. To view and manage errors, see Manage attribute rule errors.