Skip To Content

Evaluate

Description

Using the specified version and session ID, the evaluate operation evaluates the rules associated with the specified features (using a selection set, geographic extent, or those features modified in a version) and create persisted error features in error tables.

Evaluation can be performed on the following types of geodatabase rules (specified by the evaluationType parameter):

  • Topology rules
  • Validation and batch calculation attribute rules
The number of new errors identified along with the moment is returned.

Licencia:
Los miembros de su organización deben tener una licencia asignada para la extensión de tipo de usuario de ArcGIS Advanced Editing para utilizar esta operación.

Licencia:

An ArcGIS Data Reviewer server extension license is required when datasets contain Data Reviewer-based validation attribute rules.

Request parameters

ParameterDetails
f

Description: The output response format. The default response format is html.

Values: html | json

gdbVersion

Description: The name of the geodatabase version (the default is DEFAULT). This parameter is optional.

Syntax: gdbVersion=<version>

sessionId

Description: The token (GUID) used to lock the version. If the calling client is editing a named version, the sessionId value must be provided. If the client is editing DEFAULT, the version may not be locked and the sessionId value should not be specified. This parameter is optional.

Syntax: sessionId=<guid>

evaluationArea

Description: The envelope of the area to validate. This type of validation does not result in a change to the last evaluation moment in a version. This parameter is optional.

changesInVersion

Description: Specifies whether the features that have changed in the version will be evaluated (the default is false). This parameter does not apply to the DEFAULT version or when evaluationType is topologyRules. This parameter is optional.

When set to true, the evaluationDate property for the version is updated. This is listed as a property for a version and can be accessed using the version resource and the versionInfos operation.

Values: true | false

selection

Description: A set of features that will be evaluated. This is an array of layers and the global IDs (or object IDs) of the features to evaluate. This parameter is optional.

Selections are not applicable when evaluationType is topologyRules.

Values:

[ 
  {
    "id" : <layerId1>,
    "globalIds" : [ <globalId> ],
    "objectIds" : [ <objectId> ]
  },
  {
    "id" : <layerId2>,
    "globalIds" : [ <globalId> ],
    "objectIds" : [ <objectId> ]
  }
]
evaluationType

Description: An array of evaluation types. This is a required parameter.

Values:


    "validationRules" | "calculationRules"| "topologyRules"

Example:

evaluationType=["calculationRules"]

returnEdits

Description: Specifies whether features that were edited due to feature evaluation will be returned. Results are organized layer by layer. If true, each layer may have edited features returned in an editedFeatures object.

The editedFeatures object returns full features including the original features before deletion, the original and current features for updates, and the current rows for inserts that may contain implicit changes (for example, as a result of a calculation rule).

The response includes no editedFeatures values, and exceededTransferLimit = true if the count of edited features to return is more than the maxRecordCount value. If clients are using this parameter to maintain a cache, they should invalidate the cache when exceededTransferLimit = true is returned. If the server encounters an error when generating the list of edits in the response, exceededTransferLimit = true is also returned.

Edited features are returned in the spatial reference of the feature service as defined by the services spatialReferenceobject value or by the spatialReference value of the layer extent object.

The default is false. It is always set to true when evaluating topology rules for a parcel fabric or topology.

Values: true | false

async

Description: Specifies whether the request will be processed as an asynchronous job. If true, a URL is returned that a client can visit to review the status of the job. The default is false.

Values: true | false

JSON Response syntax

JSON response (when async = false):


{
  "moment" : <datetime>,
  "exceededTransferLimit : <true | false>,
  "serviceEdits" : [
    {
      "id" : <layerId>, 
      "editedFeatures" :
        {
          "adds" : [<currentFeature1>, <currentFeature2>],
          "updates" : [
            [<originalFeature3>, <currentFeature3>],
            [<originalFeature4>, <currentFeature4>]
          ],
          "deletes" : [<originalFeature5>, <originalFeature6>]
        }
    }
  ],
  "evaluationStatistics": { 
    "rowsEvaluated": <integer>,
    "elapsedTimeInSec": <integer> 
    "errorsIdentified": <integer>, 
    "errorsCleaned": <integer> 
  },
  "errorsIdentified" : <integer>,  
  "success" : <true | false>,
  "error" : { // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
}
}

JSON response (when async = true):


{
 "statusUrl" : <url>
}

JSON response to the statusURL (when pending or in progress):


{
  "status" : "<Pending | InProgress>",  
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>
}

JSON response to the statusURL (when completed):


{
  "moment" : <datetime>,
  "exceededTransferLimit : <true | false>,
  "serviceEdits" : [
    {
      "id" : <layerId>, 
      "editedFeatures" :
        {
          "adds" : [<currentFeature1>, <currentFeature2>],
          "updates" : [
            [<originalFeature3>, <currentFeature3>],
            [<originalFeature4>, <currentFeature4>]
          ],
          "deletes" : [<originalFeature5>, <originalFeature6>]
        }
    }
  ],
   "evaluationStatistics": { 
    "rowsEvaluated": <integer>,
    "elapsedTimeInSec": <integer> 
    "errorsIdentified": <integer>, 
    "errorsCleaned": <integer> 
  },
  "errorsIdentified" : <integer>, 
  "status" : "Completed",
  "submissionTime" : <datetime>,
  "lastUpdatedTime" : <datetime>,
  "success" : <true | false>,
  "error" : {                   // only if success is false
    "extendedCode" : <HRESULT>,
    "message" : <error message>,
    "details" : [ <detail> ]
  }
}

Example usage

Evaluate the validation rules for the UNADMIN.CAROLINA version using the evaluate operation.

Request URL and parameters:

https://myserver.esri.com/server/rest/services/LandUse/ValidationServer/evaluate


f=json
gdbVersion=UNADMIN.CAROLINA
sessionID={E55FFA19-406E-46D6-847E-BD512A1F3756}
evaluationArea=
{	
 "xmin": -131.08784025268154,	
 "ymin": 22.217939537429517,	
 "xmax": -56.191114071817739,	
 "ymax": 53.0329937018149,	
 "spatialReference": {
  "wkid": 4326,
  "latestWkid": 4326	
  }
}
changesInVersion=false
evaluationType=["validationRules"]
async=true
returnEdits=true

JSON response (async=true)

{
 "moment": 1558369578880,
  "evaluationStatistics": {
   "rowsEvaluated": 209,
   "elapsedTimeInSeconds": 2
   "errorsIdentified": 199,
   "errorsCleared": 6,
  },
  "errorsIdentified" : 199,
  "success": true, 
  "status": completed,
  "submissionTime": 1656544895000, 
  "lastUpdatedTime": 1656544895000
}