Modeling NotificationsLocate this document in the navigation structure

Use

A notification is a specific type of activity which you model as a separate step in your process model. When the process flow reaches this step, an e-mail is sent to notify selected recipients that a specific event has happened or some activity has been completed in previous process steps. You can use notification activities in many places in the process model, depending on which activities and events you want the process to send notifications about.

When you model notifications, you have to define the recipients of the e-mail that is sent. Recipients can be users, groups, or roles from the User Management Engine (UME), for which an e-mail is entered in the UME, but you can also send notifications to external recipients. You can also define recipients with an expression.

For more information, see Creating Expressions .

Caution

If you use context nodes in your expression from different namespaces with equal names, you have to declare the namespaces of these nodes. To solve the name conflict you can define a name prefix for the namespace. This declaration has the following syntax: xmlns:<prefix_name>="namespace_name" .

The e-mail is sent in plain text. You can customize the subject and the text of the e-mail using text variables from the data objects in the process context. For more information about the process context, see Process Context .

Prerequisites
Procedure

1. Create the Notification

  1. Expand Process Modeling , then expand Processes .

  2. In the context menu of a process, choose Open .

  3. Expand Flow Objects from Palette .

  4. Choose Notification from the dropdown menu containing all the activities, and click the modeling surface.

    The notification appears in the place you clicked.

  5. Open the General tab page in the Properties view and specify a name for the notification in the Name field.

  6. (Optional) Specify a description of the notification in the Documentation field.

2. Define the Notification Recipients

You can define the following types of notification recipients:

UME Users

  1. In the Properties view of the notification, open the To tab page.

  2. Under UME Users , define UME principals by one of the following options:

    • Select the Choose one or more UME principals radio button to search in the UME.

      1. Choose the Choose... pushbutton.

      2. In the dialog that appears, choose a principal type from the dropdown menu and enter a principal name. Choose the Search pushbutton.

      3. Select a principal from the Search Results field and choose the Add-> pushbutton to add the principal to the Principals to Select field.

        Note

        To add all principals listed in the Search Results field to the Principals to Select field, choose the Add All-> pushbutton.

      4. Choose the OK pushbutton.

        The principals you selected appear in the Principals field.

    • Select the Use an expression radio button to define notification recipients by an expression. The expression is based on the process context and is evaluated at runtime to dynamically resolve recipients.

      1. Choose the Edit... pushbutton.

        The expression editor opens.

      2. Specify an expression.

External Users

  1. In the Properties view of the notification, open the To tab page.

  2. Under External Users , define the external notification recipients by one of the following options:

    • Select the Static values for External Users radio button to specify the e-mail address, language of the e-mail, and the time zone of the recipient.

      1. Choose the Add... pushbutton.

        The system automatically fills in values in the Locale and Time Zone fields, which you can edit.

      2. Select <email-id> in the E-Mail Id field to specify a recipient's e-mail address.

      3. (Optional) Select a language from the Locale dropdown menu if you want to change the value that was filled in automatically.

      4. (Optional) Select a time zone from the Time Zone dropdown menu if you want to change the value that was filled in automatically.

    • Select the Use an expression radio button to define the notification recipients by an expression. The expression is based on the process context and is evaluated at runtime to dynamically resolve recipients.

      1. Choose the Edit... pushbutton.

        The expression editor opens.

      2. Specify an expression.

        Example

        You can use the getExternalUser(string emailID, string locale, string timezone) function to define external notification recipients. Note that you must specify the locale and timezone as long strings and not as IDs. For example, you must write "Eastern Standard Time" and "English" instead of "EST" and "en".

                                         getExternalUser(DataObject/RecipientMail, "English", "Eastern Standard Time")
                                      

3. Specify the E-mail Subject and Text

When you specify the subject and text of the e-mail, you can optionally use variables to provide them with dynamic content from the process context.

  1. In the Properties view of the notification, open the Mail tab page.

  2. Specify the necessary text in the Subject and Message fields under Parameterized Texts .

  3. (Optional) Choose the Add pushbutton under Variables to add a variable.

    The system automatically fills in values in the Name and Type fields, which you can edit. You define an expression with the expression editor.

  4. Select the value in the Name field to rename the variable.

    Caution

    You can only use the letters A-Z, the numerals 0-9, and an underscore (_) in the variable name.

  5. Select a type of the variable from the Type dropdown menu if you want to change the type that was filled in automatically.

    You must set a type before you create an expression.

  6. Choose the Edit... pushbutton to define an expression in the expression editor. Choose the OK pushbutton.

    Caution

    The return value of the expression you create must match the type you select in the Type field of the Variables table.

  7. Use braces ({}) to reference the variables you defined under Variables in the subject and text of the e-mail. You reference a variable by putting the variable's name between the braces.