Notifications

Notification Impls

Type Workflow Activity Task Notifier
SMTP Email Notification com.centurylink.mdw.workflow.task.notifier.TaskEmailNotifier
SendGrid SendGrid Email (in asset package com.centurylink.mdw.sendgrid) com.centurylink.mdw.sendgrid.TaskNotifier
Slack Slack Notify (in asset package com.centurylink.mdw.slack) com.centurylink.mdw.slack.TaskNotifier
MS Teams MS Teams Notify (in asset package com.centurylink.mdw.msteams) com.centurylink.mdw.msteams.TaskNotifier

Workflow Activity Notifications

Notification activities generally rely on a template asset. Dynamic value expressions are substituted according to the ActivityRuntimeContext. Refer to Binding Expressions for a discussion of this syntax and available values.

Task Notifications

Task notifiers also use a template asset for their content. Dynamic value expressions are substituted according to the
  • TaskRuntimeContext
  • . Refer to Binding Expressions for a discussion of this syntax and available values.

    Workflow Email Notices

    An email notification activity is used in a process definition at locations where you want to send an email to interested parties.

    Task Email Notices

    For a discussion of how to configure notifications based on task instance lifecycle events, see the topic Task Notices.

    Email Templates

    Email templates are parameterized HTML assets. that govern the format of your email notices. The parameterized values in a template are embedded using MDW binding expressions syntax. Using these parameters you can insert appropriate values, such as an Order Number, into both the email body and the subject.

    Examples

    A pre-built sample template comes with the MDW Base asset package:
    https://github.com/CenturyLinkCloud/mdw/blob/master/mdw-workflow/assets/com/centurylink/mdw/base/emailTemplate.html

    Images

    You may also insert image attachments into your e-mail body by specifying the file name as follows: <img src="${image:ctl.png}"/>. This syntax is identical regardless of the template format. The image file referenced can come from the database in the form of a workflow asset, or from the file system via the application classpath. For images stored as workflow assets, the resource name should include a logical file extension (such as .gif, .png or .jpeg) to enable the notifier to infer a MIME type for the image. The advantage of inserting images as attachments is that this avoids the problem of e-mail clients which for security reasons refuse to display images referenced via external URLs.

    Recipients

    Notification recipients are configured on the "Recipients" tab in MDW Studio. They can be designated by selecting MDW workgroups, by specifying an expression that resolves to recipient(s), or a combination of both. If an expression is specified, it should resolve to a string or a List of strings. These string value(s) must be valid MDW usernames, e-mail addresses, or Workgroup names.

    Attachments

    MDW provides the ability to upload attachments through MDWHub. These attachments can be files in any arbitrary format, and they can be associated with either individual task instances or at the Master Request ID level. Either type of attachment can be configured to accompany Notifications. To designate which files should be attached to a notification, enter a filename pattern such as *.doc on the Design tab. Multiple attachment patterns can be specified by delimiting with the tilde character (~).


    If you require customized behavior, you can extend EmailNotificationActivity and populate your own dynamic values for your template.

    Slack Notifications

    The Slack notification activity is documented under Slack Activity.

    MS Teams Notifications

    The MS Teams notification activity is documented under MS Teams Activity.