Send Notification Using SAS Template Service Policy Example

The following policies support notifications and e-mail:
Notify Participant
is used to send notifications via the SAS Alert Notification Service to participants as defined by their preferences. The notification can be configured implicitly when an activity starts or finishes by selecting a check box for the activity. Alternatively, it can be defined explicitly as a policy for any other supported workflow events.
Note: The format for this notification type cannot be customized.
Send Email
is used to send e-mail notifications via the SAS Mail Service using the information provided in the policy definition.
Note: The format for this notification type cannot be customized.
Note: This policy was formerly named Send Notification.
Send Notification By Data Object
is used to send notifications via the SAS Alert Notification Service based on the information stored in various workflow data objects.
Note: The format for this notification type cannot be customized.
Note: This notification policy is supported for legacy usage and does not leverage the SAS platform user preference settings regarding alert and e-mail support. Therefore, one of the other notification policies should be used.
Send Notification By Workflow Role
is used to notifications via the SAS Alert Notification Service based on the workflow role of a user.
Note: The format for this notification type cannot be customized.
Note: This notification policy is supported for legacy usage and does not leverage the SAS platform user preference settings regarding alert and e-mail support. Therefore, one of the other notification policies should be used.
Send Workflow Group Notification
is used to send a workgroup event notification, which triggers the SAS Alert Notification service to generate end-user notification messages. This policy is used to send notifications to a group or set of recipients and where all recipients are required to be addressed in the same message. This capability is useful in collaboration scenarios or where the event should be copied to all interested parties. E-mail is the only delivery channel supported using the group notification policy.
Note: Five expiry options are available: None, Remove, Reroute, Resend, and Start Workflow. For more information, see Expiry Options for Notification Policies.
Send Workflow Notification
is used to send a directed workgroup notification via the SAS Alert Notification service. This type of notification can be sent to users via e-mail, SMS message or displayed in a portlet and leverage the SAS Template Service to support custom formats.
Note: Five expiry options are available: None, Remove, Reroute, Resend, and Start Workflow. For more information, see Expiry Options for Notification Policies.
The Approval Escalation Process example demonstrates two types of timer policy usage as well as sending a notification using the SAS Template Service. The Timer Expired Event policy triggers a periodic notification to the group assigned to the Review Order task with the Send Workflow Notification action. The notification-related policy parameters are as follows:
Policy Parameter
Value
Recipient(s)
Group Recipient(s)
${../Account Manager}
Description
Template
SAS_Email_Message
Directive
Notification Variables
../MSG, ../DESC
HTTP Parameter
There are no individual recipients for this notification, but the Account Manager group is assigned indirectly via data object substitution. For more information, see Data Object Substitution.
The default value for this data object is US Region Accountants, so any users assigned to this group in SAS metadata receive an alert each time period as defined in the previous table. The SAS_Email_Message template is used, which is also the default if no template is specified.

SAS_Email_Message Template

$if(_SAS_TEMPLATE_TXT)$
The issue priority is: $ISSUEPRI$
$DESC$
--------------------------------------------
$TO$
$MSG$
This is a system-generated message. Do not reply to this email.
$endif$
This template contains three variables: DESC, TO and MSG. This policy example designates values for DESC and MSG by listing them as Notification Variables, which associates the values for the data objects within the example with the template. Here is the resulting e-mail message:
e-mail message generated from SAS_Email_Message template
See the examples provided with SAS Workflow Studio for details of this example.