Spatial notifications
Cette rubrique concerne exclusivement ArcEditor et ArcInfo.
What are spatial notifications?
Spatial notifications allow you to send notifications as a result of changes to your database. You can choose to send the notifications based on three types of changes or a combination of them:
- Changes to a specified dataset
- Changes in a specified area
- Changes to a specific feature based on a criterion
For more information on extending the Workflow Manager Spatial Notification framework with your own custom evaluators, notifiers, or senders, refer to the Workflow Manager SDK.
Spatial notification configuration basics
Evaluators are the rules that govern when notifications are sent in the system. There are mainly two types of evaluators that can be used to trigger spatial notifications.
- Dataset evaluators trigger a notification anytime a feature in the dataset is modified. Basically an addition, deletion, or change to an existing feature will trigger a notification.
The dataset evaluators can be set up to track more detailed changes based on your needs. For example, you can choose to send notifications when a feature is modified, but you are only interested in a certain field in the attributes of this layer. You can configure the properties that trigger such notifications.
- Area evaluators trigger a notification anytime a feature changes within the area specified. You can define the area by drawing a box or choosing to use the area of interest for the job currently being executed.
The notifier defines what means the alerts are sent through. ArcGIS Workflow Manager allows you to send notifications through e-mails. However, this can be extended to use your own notifiers like SMS, instant messaging, and so on.
E-mails are sent for each feature that meets the evaluator criteria; by checking the summarize option, an e-mail is sent for each edit session.
Configuring the rules that trigger notification
Creating change rules
Define the rules that would drive the notifications that are sent when edits are made to data.
- Open the Workflow Manager Administrator and connect to your Workflow Manager database.
- Select the Spatial Notification folder under Notifications folder.
-
Right-click and click Add to create a new rule.
-
Enter a name and description for the new rule.
-
Click Add to add an evaluator to the rule.
The Choose Evaluator dialog box appears.
- Choose the type of evaluator you want this rule to have.
-
Do one of the following to add an evaluator:
To add a dataset evaluator
- Click Add.
- If more than one Data Workspace is configured, you will be prompted to choose which one contains the dataset you wish to add.
- Choose the dataset you wish to receive notifications for.
- Click Select.
- Click OK.
- Select the new dataset evaluator and click Properties to create conditions.
To add an AOI evaluator
- Choose the Geometric Operation that will be used for the evaluation:
- Intersects
- Contains
- Crosses
- Envelope Intersects
- Overlaps
- Touches
- Within
- Choose whether the opposite of the operation should be used by checking the Use Inverse of Operation option.
- Opt to use either the job's AOI or to define your own.
Remarque :
If choosing to define your own, the tools will become active so you can draw the polygon on the map.
- Click OK
The evaluator is added to the list.
- Add additional evaluators for this rule.
The list represents how this rule will be executed. Any features found that pass the first evaluator will be passed to the next, and so on. Any features that remain will trigger the notification to be sent.
-
Choose the Email Notifier.
By default, there is only one notifier: Email Notifier. It is possible to extend this with your own type of notifier. For more information, reference the Workflow Manager SDK.
-
Click Edit.
The Email Notifier dialog box appears.
- Enter the Subject of the e-mail.
-
Enter the Message.
The ellipsis (...) button allows you to open a dialog box showing you all the tokens available. This would allow you to show the feature class that was edited, the type of the change that was made, or the user who triggered the notification.
- Enter a Sender Email and Name.
- Choose the Subscribers.
- Click OK to close the Email Notifier dialog box.
- Click Summarize to generate one e-mail for each time the rule defined is matched.
By checking this option, Workflow Manager will generate the e-mail as defined in step 12 above, and each feature that was edited would have a line entry in the e-mail. If this option is not checked, you will receive an e-mail for all the individual edits that satisfy the rule.
-
Click OK to save the new rule and close the Change Rule dialog box.
The new rule shows up in the list on the Change Rules folder.
Sending spatial notifications
The ArcGIS Workflow Manager desktop installs a Windows service known as the Workflow Manager Spatial Notification Service. This service can be seen under the Windows services.
Starting the Windows service
The alerts for the spatial notifications are sent using a Window service. The service runs at an interval of 30 seconds by default to check for edits that match the rules defined in the default Workflow Manager repository.
- From the Start Menu, open Control Panel > Administrative Tools > Services.
-
Select the Workflow Manager Spatial Notification Service, right-click, then choose Properties.
The Workflow Manager Spatial Notification Service Properties dialog box appears.
- On the Workflow Manager Spatial Notification Service Properties dialog box, activate the Log On tab.
- Choose the This account option and specify a valid Windows user that is also registered as a Workflow Manager user.
- Click Apply to maintain the update.
- Click OK when prompted that the changes will not take effect until you stop and start the service.
- Click OK on the Workflow Manager Spatial Notification Service Properties dialog box.
- Start the service.
This setting is only required on one of the machines, and it applies to your entire Workflow Manager database.
Once the service is started, e-mails will be sent when features that meet your change rule criteria are modified. These e-mails are triggered after you post your edits back to the default database version.
![Remarque Remarque](rsrc/note.png)
The changes are monitored on the default database when the service was started. If the default Workflow Manager database is switched, you will have to restart the service to monitor the feature edits in the new database.