Skip To Content

Evaluate Rules

Summary

Evaluate geodatabase rules and functionality that are managed by services.

Learn more about evaluating rules

Usage

  • The input feature service workspace must have the validation capability enabled.

Syntax

EvaluateRules_management (in_workspace, evaluation_types, extent, async)
ParameterExplanationData Type
in_workspace

The URL of a feature service that has the validation capability enabled, for example, https://myserver/server/rest/services/myservicename/FeatureServer.

Workspace
evaluation_types
[evaluation_types,...]

Specifies the types of evaluation to be executed.

  • CALCULATION_RULESEvaluate batch calculation attribute rules.
  • VALIDATION_RULESEvaluate validation attribute rules.
String
extent

The extent to be evaluated.

Extent
async

Specifies whether the evaluation will run synchronously or asynchronously.

  • ASYNCThe evaluation will run asynchronously. This option dedicates server resources to run the evaluation with a longer time-out. Running asynchronously is recommended when evaluating large datasets that contain a lot of features requiring calculation or validation. This is the default.
  • SYNCThe evaluation will run synchronously. This option has a shorter time-out and is best used when evaluating an extent with a small number of features requiring calculation or validation.
Boolean

Derived Output

NameExplanationData Type
updated_workspace

The updated feature service workspace that has been evaluated.

Workspace

Code sample

EvaluateRules example (stand-alone script)

Evaluate validation rules asynchronously using the EvaluateRules tool.

# import arcpy
import arcpy

# assign local variables
in_workspace = "https://myserver/server/rest/services/myservicename/FeatureServer"
extent = "-113.187897827702 38.0958054854392 -113.142166008849 38.1404599940719"

# run the evaluation
arcpy.EvaluateRules_management(in_workspace, "VALIDATION_RULES", extent, "ASYNC")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics