FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<change-rules-url>/add |
---|---|
Parent Resource | Change Rules |
Parameter | Details |
---|---|
f | Description: The response format. The default response format is html. Values: html | json |
user | Required Description: The username of the client. |
name | Required Description: The name of the change rule. |
description | Description: A brief description of the change rule. |
summarize | Description: Whether a notification should be sent for each matched item (false),
or one notification for all matched items (true). The default is false .Values: true | false |
notifier | Required Description: A set of configuration properties for the notifier that is used to send notifications when the change rule is matched. Syntax:
{
"type": "email",
"subject": <subject>,
"message": "<message>",
"senderEmail": "<senderEmail>",
"senderName": "<senderName>",
"subscribers": [ "<recipient1>", "<recipient2>", ... ],
"attachJobAttachments": <true | false> // Added at 10.1
}
Example: { "type": "email", "subject": "Spatial notification for airport feature changes", "message": "There have been changes to the Airports feature class.", "senderEmail": "noreply@example.com", "senderName": "Workflow Alerts", "subscribers": [ "cjones@example.com", "gisdept@example.com" ], "attachJobAttachments": true } |
evaluators | Required Description: A list of the condition evaluators that comprise the change rule. Syntax: [ // AOI condition evaluator { "type": "aoi", "relation": "<spatialRelation>", // Refer to the ArcGIS documentation for esriSpatialRelEnum "inverse": <true | false>, "useJobAOI": <true | false>, "aoi": <polygon> }, // Multi-dataset condition evaluator { "type": "multiDataset", "datasetConfigurations": [ { "name": "<configurationName>", "dataWorkspaceId": "<dataWorkspaceId>", "dataset": "<datasetName>", "changeFields": "<fieldList>", // Use "*" to denote all fields "changeCondition": <changeCondition>, // Valid values: 0 (all), 1 (before), 2 (after) "whereConditions": [ // Valid values for compareOperator: 0 (equal), 1 (not equal), 2 (greater than), 3 (greater or equal), 4 (less than), 5 (less or equal), 6 (contains) { "field": "<fieldName1>", "operator": <compareOperator1>, "compareValue": <compareValue1> }, { "field": "<fieldName2>", "operator": <compareOperator2>, "compareValue": <compareValue2> }, ... ] }, ... ] }, ... ] Example: [ { "type": "aoi", "relation": "esriSpatialRelIntersects", "inverse": false, "useJobAOI": false, "aoi": { "rings": [ [ [-117, 34], [-117, 35], [-116, 35], [-116, 34], [-117, 34] ] ], "spatialReference": { "wkid": 4326 } } }, { "type": "multiDataset", "datasetConfigurations": [ { "name": "Airport edits", "dataWorkspaceId": "{39FD6B70-DA49-4F91-BD9D-0F2F0A8FEC26}", "dataset": "sde.Airports", "changeFields": "*", "changeCondition": 0, "whereConditions": [ { "field": "ICAO", "operator": 6, "compareValue": "LAX" } ] } ] } ] |
Example 1: URL for creating a change rule in the "Workflow" service on sampleserver.
http://sampleserver/arcgis/rest/services/Workflow/WMServer/spatialNotification/changeRules/add?user=cjones&name=Airport%20changes&summarize=true¬ifier={...}&evaluators=[{...},...]{ "changeRuleId": "<ruleId>" }
{ "changeRuleId": "{153604D3-3694-405C-91E3-264FC53519EF}" }