Description
    WMNotificationTask class to perform operations on Workflow Manager (Classic) Notifications.
    Class hierarchy
    workflowmanager/BaseTask
|_workflowmanager/WMNotificationTask
    Constructors
     
     
    Properties
      
        |
        | disableClientCaching | Boolean | The indicator to disable client browser caching. | 
        | proxyURL | String | The proxy URL. | 
        | token | String | The token string if security is on. | 
        | url | String | The base URL for Workflow Manager (Classic) service. | 
      
    Methods
      
        |
        | addChangeRule(rule, user, callback, errback) | none | Creates a new spatial notification change rule. | 
  
        | deleteChangeRule(ruleId, user, callback, errback) | none | Deletes a spatial notification change rule. | 
        | getAllChangeRules(callback, errback) | Object | Get a list of all the spatial notification change rules (ChangeRule[]) configured in the ArcGIS Workflow Manager (Classic) system. | 
        | getChangeRule(ruleId, callback, errback) | Object | Get a single spatial notification change rule ChangeRule by ruleId. | 
        | getChangeRuleMatch(matchId, callback, errback) | Object | Get information about the change and change rule related to a spatial notification match (ChangeRuleMatch). | 
        | getDatabaseTime(dataWorkspaceId, callback, errback) | none | Get the current time of the database. | 
        | getSessionMatches(sessionId, callback, errback) | Object | Get the list of matches (ChangeRuleMatch[]) to change rules found during a spatial notification session. | 
        | notifySession(sessionId, deleteAfter, user, callback, errback) | none | Sends the notifications configured for the matches found during a rule evaluation session. | 
        | queryChangeRules(name, description, searchType, user, callback, errback) | Object | Queries the list of spatial notification change rules and returns a filtered subset of all change rules (ChangeRule[]). | 
        | runSpatialNotificationOnHistory(dataWorkspaceId, from, to, logMatches, send, user, callback, errback) | none | Executes the configured spatial notification change rules on a data workspace by evaluating the geodatabase archive. | 
  
        | sendNotification(jobId, notificationType, user, callback, errback) | none | Sends a notification of the specified type. | 
        
        | subscribeToNotification(notificationTypeId, email, user, callback, errback) | none | Adds an email address to the subscriber list for a specific notification type. | 
  
        | unsubscribeFromNotification(notificationTypeId, email, user, callback, errback) | none | Removes an email address from the subscriber list for a specific notification type. | 
        
      
    Constructor Details
      
        new WMNotificationTask(url)
Constructor for WMNotificationTask. Disable client caching is default to be true.
      Parameters:
        
          | <string>url | Required | The base Workflow Manager (Classic) REST URL. | 
        
       
      Sample: 
require([
    "workflowmanager/WMNotificationTask", ...
], function(WMNotificationTask, ...) {
    var WMNotificationTask = new WMNotificationTask("http://myserver/arcgis/rest/services/WMService/WMServer");
    });
    ...
});
   
         
       
     Property Details
      
        <Boolean> disableClientCaching
The indicator to disable client browser caching.
       
      
        
        
        The token string if security is on.
       
        
        
        The base URL for Workflow Manager (Classic) Service.
       
     Method Details
      
        addChangeRule(rule, user, callback, errback)
Creates a new spatial notification change rule. If the request is successful, the user-specified callback function is invoked with the result as a string of the new changeRule Id. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
        
          | <ChangeRule> rule | Required | The rule to be added. | 
          | <string> user | Required | The user name. | 
          
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        deleteChangeRule(ruleId, user, callback, errback)
Deletes a spatial notification change rule. If the request is successful, the user-specified callback function is invoked with the empty result. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
                  
          | <string> ruleId | Required | The Id of the rule to be deleted. | 
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
      
        getAllChangeRules(callback, errback)
Get a list of all the spatial notification change rules (
ChangeRule[]) configured in the ArcGIS Workflow Manager (Classic) system. If the request is successful, the user-specified callback function is invoked with the result as a 
ChangeRule[]. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
                  
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
      
        getChangeRule(ruleId, callback, errback)
Get a single spatial notification change rule 
ChangeRule by ruleId. If the request is successful, the user-specified callback function is invoked with the result as a 
ChangeRule. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
                  
          | <string> ruleId | Required | The rule Id. | 
          | <function> callback | Required | The success callback function name. | 
          | <function> errback | Required | The error callback function name. | 
        
        
        
      
        getChangeRuleMatch(matchId, callback, errback)
Get information about the change and change rule related to a spatial notification match (
ChangeRuleMatch). If the request is successful, the user-specified callback function is invoked with the result as a 
ChangeRuleMatch. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
                  
          | <string> matchId | Required | The spatial notification match Id. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
      
        getDatabaseTime(dataWorkspaceId, callback, errback)
Get the current time of the database. If the request is successful, the user-specified callback function is invoked with the result as Date. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
                          
          | <string> dataWorkspaceId | Required | The dataWorkspace Id. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        getSessionMatches(sessionId, callback, errback)
Get the list of matches (
ChangeRuleMatch[]) to change rules found during a spatial notification session. If the request is successful, the user-specified callback function is invoked with the result as a 
ChangeRuleMatch[]. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
                            
          | <string> sessionId | Required | The spatial notification session Id. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        notifySession(sessionId, deleteAfter, user, callback, errback)
Sends the notifications configured for the matches found during a rule evaluation session. If the request is successful, the user-specified callback function is invoked with the empty result. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
        
          | <string> sessionId | Required | The spatial notification session Id. | 
          
          | <boolean> deleteAfter | Required | Whether to delete the session matches after sending any notifications. The default is false. | 
          
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        queryChangeRules(name, description, searchType, user, callback, errback)
Queries the list of spatial notification change rules and returns a filtered subset of all change rules (
ChangeRule[]). If the request is successful, the user-specified callback function is invoked with the result as a 
ChangeRule[]. Otherwise, the errback function is invoked with the result error message as string.
Input Parameters:
        
          | <string> name | Required | A search string to find within change rule names. | 
          
          | <string> description | Required | A search string to find within change rule descriptions. | 
          | <ChangeRuleSearchType> searchType | Required | The type of search to perform. The default is CONTAINS. | 
                              
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        runSpatialNotificationOnHistory(dataWorkspaceId, from, to, logMatches, send, user, callback, errback)
Executes the configured spatial notification change rules on a data workspace by evaluating the geodatabase archive. If the request is successful, the user-specified callback function is invoked with the result as a string (session Id). Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
        
          | <string> dataWorkspaceId | Required | The dataWorkspace Id. | 
          | <Date> from | Required | The starting time to query for new changes. | 
          | <Date> to | Required | The ending time to query for new changes. | 
          | <boolean> logMatches | Required | Whether you want to keep the matches found stored in the ArcGIS Workflow Manager (Classic) repository. The default is false. | 
          | <boolean> send | Required | Whether you want to the send notifications at the time that matches are found. The default is false. | 
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        sendNotification(jobId, notificationType, user, callback, errback)
Sends a notification of the specified type. If the request is successful, the user-specified callback function is invoked with the empty result. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
        
          | <int> jobid | Required | The job Id. | 
          
          | <string> notificationType | Required | The name of the notification type to send. | 
          
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        subscribeToNotification(notificationTypeId, email, user, callback, errback)
Adds an email address to the subscriber list for a specific notification type. If the request is successful, the user-specified callback function is invoked with the empty result. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
        
          | <int> notificationTypeId | Required | The notification Type Id. | 
          | <string> email | Required | The email address to add to the notification type's subscriber list. May contain tokens. | 
          
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. | 
        
        
        
       
        unsubscribeFromNotification(notificationTypeId, email, user, callback, errback)
Removes an email address from the subscriber list for a specific notification type. If the request is successful, the user-specified callback function is invoked with the empty result. Otherwise, the errback function is invoked with the result error message as string.
      
      Input Parameters:
        
          | <int> notificationTypeId | Required | The notification Type Id. | 
          | <string> email | Required | The email address to add to the notification type's subscriber list. May contain tokens. | 
          | <string> user | Required | The user name. | 
          | <function> callback | Optional | The success callback function name. | 
          | <function> errback | Optional | The error callback function name. |