require(["esri/tasks/workflow/NotificationTask"], function(NotificationTask) { /* code goes here */ });
Class: esri/tasks/workflow/NotificationTask
Inheritance: NotificationTask Task Accessor
Since: ArcGIS API for JavaScript 4.3

Exposes functions to perform operations with Workflow Manager notifications.

Workflow Manager provides e-mail notifications for job and spatial events, which are sent to members of staff automatically when events happen in the Workflow Manager system. Using the methods in this class you can send both spatial as well as job notifications. You can also subscribe or unsubscribe from notifications.

For spatial notifications you can add change rules, delete change rules, get one or all change rules in the system and query the change rules as well. Get the matches found in an editing session or information about an individual match. The spatial notification change rules can also be run on the archived data.

Constructors

new NotificationTask(properties)

Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummary
String

The name of the class.

more details
more details
Object

The options to be used for data requests.

more details
more details
String

URL to the ArcGIS Workflow Manager REST service.

more details
more details

Property Details

declaredClassStringreadonly

The name of the class. The declared class name is formatted as esri.folder.className.

requestOptionsObject

The options to be used for data requests. These options can also be controlled through the requestOptions method parameter.

URL to the ArcGIS Workflow Manager REST service.

Method Overview

NameReturn TypeSummary
Promise

Creates a new spatial notification change rule.

more details
more details
Promise

Deletes a spatial notification change rule.

more details
more details
Promise

Get an array of all the spatial notification change rules configured in the Workflow Manager system.

more details
more details
Promise

Get a single spatial notification change rule by ruleId.

more details
more details
Promise

Get information about a match for a change and change rule related to a spatial notification.

more details
more details
Promise

Get the current time of the database.

more details
more details
Promise

Get an array of matches that match the change rule criteria in a specific editing session.

more details
more details
Promise

Sends the notifications configured for the matches found during a rule evaluation session.

more details
more details
Promise

Queries the array of spatial notification change rules based on specified criteria.

more details
more details
Promise

Executes the configured spatial notification change rules on a data workspace by evaluating the geodatabase archive.

more details
more details
Promise

Sends an email of the specified notification type.

more details
more details
Promise

Adds an email address to the subscriber list for a specific notification type.

more details
more details
Promise

Removes an email address from the subscriber list for a specific notification type.

more details
more details

Method Details

addChangeRule(params, requestOptions){Promise}

Creates a new spatial notification change rule.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:

The change rule to be added.

user String

The username requesting the addition of the rule.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns the unique id of the new change rule as string.

deleteChangeRule(params, requestOptions){Promise}

Deletes a spatial notification change rule.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
ruleId String

The unique id of the rule to be deleted.

user String

The username requesting the deletion of the rule.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a boolean that indicates if the request succeeded or not.

getAllChangeRules(requestOptions){Promise}

Get an array of all the spatial notification change rules configured in the Workflow Manager system.

Parameter:
requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns an array of all the spatial notification change rules configured in the Workflow Manager system.

getChangeRule(ruleId, requestOptions){Promise}

Get a single spatial notification change rule by ruleId.

Parameters:
ruleId String

The unique id of the change rule.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a single spatial notification change rule.

getChangeRuleMatch(matchId, requestOptions){Promise}

Get information about a match for a change and change rule related to a spatial notification.

Parameters:
matchId String

The unique id of the spatial notification match.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a ChangeRuleMatch object with information about matches found.

getDatabaseTime(dataWorkspaceId, requestOptions){Promise}

Get the current time of the database.

Parameters:
dataWorkspaceId String

The unique id of the dataWorkspace.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a date to indicate the current time of database.

getSessionMatches(sessionId, requestOptions){Promise}

Get an array of matches that match the change rule criteria in a specific editing session.

Parameters:
sessionId String

The unique id of the spatial notification session.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns an array of ChangeRuleMatch objects that match the change rule criteria in a specific editing session.

notifySession(params, requestOptions){Promise}

Sends the notifications configured for the matches found during a rule evaluation session.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
sessionid String

The unique id of the spatial notification session.

deleteAfter Boolean

Indicates whether to delete the session matches after sending any notifications. The default is false.

user String

The username requesting the sending of notification.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a boolean that indicates if the request succeeded or not.

queryChangeRules(params, requestOptions){Promise}

Queries the array of spatial notification change rules based on specified criteria.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
name String

A search string to find within change rule names.

description String

A search string to find within change rule descriptions.

searchType String

The type of search to perform, default is contains.

Possible Values: contains | exact | starts-with | ends-with

user String

The username requesting the search.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns the array of spatial notification change rules that meet the query criteria.

runSpatialNotificationOnHistory(params, requestOptions){Promise}

Executes the configured spatial notification change rules on a data workspace by evaluating the geodatabase archive.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
dataWorkspaceId String

The unique id of the dataWorkspace.

from Date

The starting time to query for new changes.

to Date

The ending time to query for new changes.

logMatches Boolean

Indicates whether to keep the matches found, stored in the ArcGIS Workflow Manager repository. The default is false.

send Boolean

Indicates whether to the send notifications at the time matches are found. The default is false.

user String

The username requesting the execution of the rule.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns the session id(String) when the configured spatial notification change rules were executed.

sendNotification(params, requestOptions){Promise}

Sends an email of the specified notification type.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
jobId Number

The unique id of the job.

notificationType String

The name of the notification type to be sent.

user String

The username requesting to send the notification.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a boolean that indicates if the request succeeded or not.

subscribeToNotification(params, requestOptions){Promise}

Adds an email address to the subscriber list for a specific notification type.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
notificationTypeId Number

The unique id of the notification type to which the email address will be added.

email String

The email address to add to the notification type's subscriber list. May contain tokens.

user String

The username requesting the addition of email address to the notification subscriber's list.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a boolean that indicates if the request succeeded or not.

unsubscribeFromNotification(params, requestOptions){Promise}

Removes an email address from the subscriber list for a specific notification type.

Parameters:
params Object

See the object specifications in table below for the structure of the params object.

Specification:
notificationTypeId Number

The unique id of the notification type from which the email address will be removed.

email String

The email address to remove from the notification type's subscriber list. May contain tokens.

user String

The username requesting the removal of email address to the notification subscriber's list.

requestOptions Object
optional

Additional options to be used for the data request (will override requestOptions defined during construction).

Returns:
TypeDescription
PromiseWhen resolved, returns a boolean that indicates if the request succeeded or not.

Type Definitions

AOIEvaluatorObject

AOIEvaluator represents the rules that triggers a spatial notification based on area of interest(AOI). This contains the geometric operation and the criteria to be used based on the AOI.

Properties:

The area of interest.

inverse Boolean

Indicates whether to inverse the spatial relationship or not. For example, if the spatial relationship is inversed for operator Within, then features that are not within will be used.

name String

The name of the AOI evaluator.

relation String

The spatial relationship to be applied for evaluation of the rule.

Possible Values: intersects | contains | crosses | envelope-intersects | index-intersects | overlaps | touches | within | relation

type String

The type of the AOI evaluator.

useJobAOI Boolean

Indicates whether job AOI should be used as the extent or not for the evaluation of the rule.

ChangeRuleObject

ChangeRule represents a single change rule that triggers a spatial notification. When the criteria defined in the rule is met an email notification is sent to recipients.

Properties:
description String

The description of the change rule.

evaluators Object[]

An array of AOI and Dataset evaluators.

The unique id of the change rule.

name String

The name of the change rule.

notifier Object

The type of notifier, the default is email notifier. This can be extended to use your own notifiers like SMS, instant messaging.

summarize Boolean

Indicates whether to summarize email contents or not.

ChangeRuleMatchObject

ChangeRuleMatch represents information about the change and change rule related to a spatial notification match.

Properties:
changeTime Date

The time the change occured to the data.

changeType String

The type of change that happened to the data.

Possible Values: add | modify | delete | all

dataset String

The dataset that changed.

dataWorkspaceId String

The unique id of the data workspace containing the changed data.

The unique id of the associated to the change.

jobID String

The unique id of the job where the change was made.

ruleID String

The unique id of the change rule.

DatasetConfigurationObject

DatasetConfiguration represents the criteria and dataset that the change rule applies to.

Properties:
changeCondition Number

This indicates whether the notification will be sent always or if values change to defined in whereConditions or if values change from defined in whereConditions.

Possible Values: always | changed-to | changed-from

changeFields String

The name of the fields, changes to which trigger the notification.

dataset String

The name of the dataset that will trigger the notification.

dataWorkspaceId String

The unique id of the data workspace containing the changed data.

name String

The name of the dataset configuration rule.

whereConditions WhereCondition[]

The where conditions defining the criteria to trigger the rule.

DataSetEvaluatorObject

DataSetEvaluator represents the rules that triggers a spatial notification based on the changes in a dataset. This contains the specific features and feature class that are participating in a spatial notification rule.

Properties:
dataSetConfigurations DatasetConfiguration[]

The array of DatasetConfigurations representing the dataset to which the rule applies.

name String

The name of the dataset evaluator.

type String

The type of the dataset evaluator.

EmailNotifierObject

EmailNotifier represents the properties of a notification type that is configured in the Workflow Manager system.

Properties:
attachJobAttachments Boolean

Indicates whether the job's file attachment will be attached to the email.

message String

The message content sent as part of the email.

name String

The name of the notifier.

senderEmail String

The sender's (from) email address.

senderName String

The sender's (from) name.

subject String

The subject of the email.

subscribers String[]

The array of subscribers who will get the email.

type String

The type of notifier.

NotificationTypeObject

NotificationType represents the properties of a notification type that are sent when certain events happen in the Workflow Manager system.

Properties:
attachJobAttachments Boolean

Indicates whether the job's file attachment will be attached to the email.

The unique id of the notification type.

message String

The message content sent as part of the email.

senderEmail String

The sender's (from) email address.

senderName String

The sender's (from) name.

subject String

The subject of the email.

subscribers String[]

The array of subscribers who will get the email.

type String

The type of notifier.

WhereConditionObject

WhereCondition returns the condition set in DatasetConfiguration for a Dataset evaluator.

Properties:
compareValue Object

The value to be compared/evaluated with.

field String

The field name that contains the value to be compared.

operator String

The operator to be used for comparison.

Possible Values: equal | not-equal | greater-than | greater-or-equal | less-than | less-or-equal | contains

API Reference search results

NameTypeModule

There were no match results from your search criteria.