Job Notifications
Cette rubrique s'applique uniquement à ArcGIS for Desktop Standard et ArcGIS for Desktop Advanced.
Job notification types define the template for messages to be sent to individuals, via e-mail, after certain events have occurred in the system. Similar to activity types, these notifications are sent at events throughout the life cycle of the job. Unlike activity types, users must be subscribed to the notification type to be able to see them. In addition to the message, you can include all job attachments as part of the email sent with notifications. By default, these notifications happen at the following times:
- Job is assigned or reassigned
- Job created
- Job cloned
- Job closed
- Dependency added
- Hold released
- Hold added
- Extended properties updated
- Step execution completed
- Workflow updated
- Workflow committed for execution
- Step completed
- Attachment added
- Attachment deleted
- Dependency deleted
- Job properties updated
- Area of interest updated
- Version created
- Current step set
- Step assigned or reassigned
- Step started
- Step set as current job step
- Notes updated
- Linked (1-M) property added
- Linked (1-M) property deleted
- Linked (1-M) property updated
Unlike activity types, notifications can be extended and easily built into your workflows using the Send Notification step type. This custom step is part of the Workflow Manager Steps library and takes a notification type as an argument.
A notification type has the following properties associated with it:
- Name
- Subject
- Message Body
- Include Job Attachments
- Sender E-mail
- Sender Display Name
- Subscribers
The Subscribers property is a list of e-mail addresses. Each of the above properties can contain dynamic values. These are controlled by tokens. For example, you can subscribe the current user to a particular notification even if you don't know who that person is at design time by entering the following:
[EMAILOF([SYS:CUR_LOGIN])]
For notifications to be sent, the SMTP server for the system must be configured. For more information about configuring this setting, see Workflow Manager System Settings. The attachment size limit is based on your mail server settings.
Adding new job notification types
Open the Configuration manager and connect to your Workflow Manager database.
You can add new notification types that are triggered by actions in the application or triggered by workflow steps.
-
In the Workflow Manager Configuration Manager, navigate to the Job Notifications folder under Notifications.
The list will show all the currently configured Notification Types. If no Notification Types exist, the list will be blank.
-
Right-click and click Add Job Notification.
The Notification Type Properties dialog box appears.
-
Enter a name.
This will be how you identify the notification type when configuring steps in the workflow.
-
Enter a Subject.
This will be the subject of the e-mail that is sent.
-
Enter a Message.
This will be the contents of the e-mail that is sent.
- Check the Include Job Attachment check box to send all the job's attachment with this notification.
- Click the To/From tab.
-
Enter the Sender's E-mail and Display name.
These fields could contain tokens for the current user at the time the notification is sent.
-
Click Modify to add or remove subscribers or the people that receive the notification.
Enter the e-mail address in the lower text box (separate multiple subscribers with a semicolon) or double-click a Workflow Manager User to add their e-mail address.
- Click OK to save changes and close the dialog box.
Subscribing to existing notification types
In the Administrator
You can subscribe to multiple notification types in the Administrator.
- Select the notification types that you want to subscribe users to by holding the Shift key as you click.
-
Enter the Sender's E-mail and Display name.
These fields could contain tokens for the current user at the time the notification is sent.
-
Click Modify to add or remove subscribers or the people that receive the notification.
Enter the e-mail address in the lower text box (separate multiple subscribers with a semicolon) or double-click a Workflow Manager User to add their e-mail address.
- Click OK to save changes and close the dialog box.
In the Application
You can also subscribe to notification types in the application.
- Click the Subscribe to Notifications button .
If you do not have an e-mail address configured, the application will display the User Properties dialog box for you to provide a valid e-mail address.
- Click the check box by the notification type you would like to subscribe the current user's e-mail to.
Repeat this for all notification types that you want to subscribe the current user's e-mail to.
- Switch to the Spatial Notifications tab to subscribe to existing spatial notification rules.
- Click OK to apply changes.
Subscribing for notifications is controlled by the CanSubscribeToNotifications privilege.
Using notifications in your workflows
If you have configured custom notification types for your system, you can build them into your workflows by setting a notification as part of a step property or using the SendNotification custom step.
As a property of a step
Open the Configuration Manager and connect to your Workflow Manager database.
You can configure your workflow steps to send notifications when the step is executed.
- In the Workflow Manager Configuration Manager, select the Workflow folder under Job Components.
- Edit an existing workflow or create a new one.
- Click the Workflow tab.
- Drag a step into the workflow canvas or select a step already in the workflow.
- Right-click the step and click Properties.
The Step Properties dialog box appears.
- Click Details.
The Detailed Step Properties dialog box appears.
- Choose the notification type that you want sent after this step is executed from the drop-down list.
- Click OK on all dialog boxes to make these settings persist.
As a step type
Open the Configuration Manager and connect to your Workflow Manager database.
You can configure your workflow steps to send notifications when the step is executed.
- In the Workflow Manager Configuration Manager, select the Step Types folder under Job Components.
-
Right-click and click Add Step Type.
The Step Type Properties dialog box appears.
- Give the step a name, description, and indicator. Leave the Hide Workflow Manager While Running check box unchecked.
- Select the Execution tab.
- Choose Custom Step Object.
-
Browse for the CLSID/ProgID.
The Browse for Custom Steps dialog box appears.
- Choose SendNotification from the Workflow Manager Steps library and click OK.
-
In the arguments, enter the name of the notification type you would like this step to send.
For this step type, the argument must be preceded with /notifType:
/notifType:MyCustomNotification
- Verify that the argument you've entered is formatted correctly.
- Click OK to save the new step type and close the dialog box.
- Edit an existing workflow or create a new one.
-
Click the Workflow tab.
Your new step type appears in the step list under the Custom Step folder.
-
Add it to the workflow and arrange the path to include the new step.
You're now ready to create a new job and see how it works.
Remember to use tokens to get runtime information about the job or current user at the time the notification is sent.
The message for the notification can contain HTML tags when HTML Notifications have been enabled in the Workflow Manager System Settings.