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)
properties Object See the properties for a list of all the properties that may be passed into the constructor. |
Property Overview
Name | Type | Summary | |
---|---|---|---|
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.urlString
URL to the ArcGIS Workflow Manager REST service.
Method Overview
Name | Return Type | Summary | |
---|---|---|---|
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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:rule ChangeRuleThe change rule to be added.
user StringThe username requesting the addition of the rule.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When resolved, returns the unique id of the new change rule as string. deleteChangeRule(params, requestOptions){Promise}
Deletes a spatial notification change rule.
Parameters:params ObjectSee the object specifications in table below for the structure of the
params
object.Specification:ruleId StringThe unique id of the rule to be deleted.
user StringThe username requesting the deletion of the rule.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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:optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 StringThe unique id of the change rule.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 StringThe unique id of the spatial notification match.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When resolved, returns a ChangeRuleMatch object with information about matches found. getDatabaseTime(dataWorkspaceId, requestOptions){Promise}
Get the current time of the database.
Parameters:dataWorkspaceId StringThe unique id of the dataWorkspace.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 StringThe unique id of the spatial notification session.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:sessionid StringThe unique id of the spatial notification session.
deleteAfter BooleanIndicates whether to delete the session matches after sending any notifications. The default is false.
user StringThe username requesting the sending of notification.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:name StringA search string to find within change rule names.
description StringA search string to find within change rule descriptions.
searchType StringThe type of search to perform, default is contains.
Possible Values: contains | exact | starts-with | ends-with
user StringThe username requesting the search.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:dataWorkspaceId StringThe unique id of the dataWorkspace.
from DateThe starting time to query for new changes.
to DateThe ending time to query for new changes.
logMatches BooleanIndicates whether to keep the matches found, stored in the ArcGIS Workflow Manager repository. The default is false.
send BooleanIndicates whether to the send notifications at the time matches are found. The default is false.
user StringThe username requesting the execution of the rule.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:jobId NumberThe unique id of the job.
notificationType StringThe name of the notification type to be sent.
user StringThe username requesting to send the notification.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:notificationTypeId NumberThe unique id of the notification type to which the email address will be added.
email StringThe email address to add to the notification type's subscriber list. May contain tokens.
user StringThe username requesting the addition of email address to the notification subscriber's list.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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 ObjectSee the object specifications in table below for the structure of the
params
object.Specification:notificationTypeId NumberThe unique id of the notification type from which the email address will be removed.
email StringThe email address to remove from the notification type's subscriber list. May contain tokens.
user StringThe username requesting the removal of email address to the notification subscriber's list.
optionalrequestOptions ObjectAdditional options to be used for the data request (will override requestOptions defined during construction).
Returns:Type Description Promise When 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:aoi PolygonThe area of interest.
inverse BooleanIndicates 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 StringThe name of the AOI evaluator.
relation StringThe spatial relationship to be applied for evaluation of the rule.
Possible Values: intersects | contains | crosses | envelope-intersects | index-intersects | overlaps | touches | within | relation
type StringThe type of the AOI evaluator.
useJobAOI BooleanIndicates 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 StringThe description of the change rule.
evaluators Object[]id NumberThe unique id of the change rule.
name StringThe name of the change rule.
notifier ObjectThe type of notifier, the default is email notifier. This can be extended to use your own notifiers like SMS, instant messaging.
summarize BooleanIndicates 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 DateThe time the change occured to the data.
changeType StringThe type of change that happened to the data.
Possible Values: add | modify | delete | all
dataset StringThe dataset that changed.
dataWorkspaceId StringThe unique id of the data workspace containing the changed data.
id StringThe unique id of the associated to the change.
jobID StringThe unique id of the job where the change was made.
ruleID StringThe unique id of the change rule.
DatasetConfigurationObject
DatasetConfiguration represents the criteria and dataset that the change rule applies to.
Properties:changeCondition NumberThis 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 StringThe name of the fields, changes to which trigger the notification.
dataset StringThe name of the dataset that will trigger the notification.
dataWorkspaceId StringThe unique id of the data workspace containing the changed data.
name StringThe 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 StringThe name of the dataset evaluator.
type StringThe type of the dataset evaluator.
EmailNotifierObject
EmailNotifier represents the properties of a notification type that is configured in the Workflow Manager system.
Properties:attachJobAttachments BooleanIndicates whether the job's file attachment will be attached to the email.
message StringThe message content sent as part of the email.
name StringThe name of the notifier.
senderEmail StringThe sender's (from) email address.
senderName StringThe sender's (from) name.
subject StringThe subject of the email.
subscribers String[]The array of subscribers who will get the email.
type StringThe 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 BooleanIndicates whether the job's file attachment will be attached to the email.
id NumberThe unique id of the notification type.
message StringThe message content sent as part of the email.
senderEmail StringThe sender's (from) email address.
senderName StringThe sender's (from) name.
subject StringThe subject of the email.
subscribers String[]The array of subscribers who will get the email.
type StringThe type of notifier.
WhereConditionObject
WhereCondition returns the condition set in DatasetConfiguration for a Dataset evaluator.