Modeling Guide

Create a Notification Task

Creating and executing a notification task helps send e-mails to recipients with a message. You can customize the message to help recipients identify the status of a task in a task workflow that completed with a certain state.

Prerequisites

  • You have created a project.
  • You have created and activated at least one destination in the same project in which you are creating the notification task.
  • The destination has a connection (connection type: E-Mail) to an ADMIN system (system type: ADMIN).

Context

For example, if the notification task is the last task in a task workflow, executing the notification task can help notify the state of the preceding task in the task workflow via an e-mail to certain recipients.

Procedure

  1. Start the SAP Data Hub cockpit in a Web browser.
  2. In the System Status section, choose the Modeling tile.
    The cockpit opens the SAP Data Hub Modeling tool in a new tab in the same browser window.
  3. Create task.
    1. In the navigation pane, right-click the project within which you want to create the task and choose Start of the navigation pathNew Next navigation step TaskEnd of the navigation path.
    2. In the Create Task dialog box, provide a name for the task.
    3. In the Type dropdown list, select Notification.
    4. Choose Create.
      The tool opens a new editor where you can define your task.
  4. Define the task.
    1. In the Destination value help list, select the required destination.
      The tool populates the value help list with destinations that have connections to an ADMIN system (mail server). The connection type is E-Mail.
    2. In the Task fail status toggle button, select a value.

      Value

      Description

      ERR

      Select ERR, if you want the notification task to execute and send an e-mail, but display the overall status of the task workflow as error.

      This flag is helpful, for example, if the notification task is executed on the failure of the previous task in the task workflow. In such cases, you can control the behavior of the notification task with this flag to send an e-mail notifying the error, and to display the task workflow status as Error.

      OK

      Select OK, if you want the notification task to send an e-mail to the recipient on the execution of the task, and display the overall status of the task workflow as OK (irrespective of the state of the previous task in the task workflow).

    3. In the Recipient text field, enter the e-mail address of the user to send the e-mail.
      You can add multiple recipients separated by semicolon. The system sends the status of the task to the recipients.
    4. In the Subject text field, provide a subject for the e-mail.
      For example, write Task Execution Failed.
    5. In the Message text field, enter the content for the e-mail body.
      Enter the content as plain text. The tool does not support e-mail body with rich text or html.
  5. Save changes.
    In the global toolbar, choose Save to save the task.
  6. Activate the task.
    After creating a task object, activate the task. Activation is necessary to convert the design-time object to its equivalent runtime object in the database.
    1. In the global toolbar, choose (Activate) to activate the task.
  7. (Optional) Execute the task.
    After creating and activating a task, you can directly execute the task for an immediate execution.
    1. In the global toolbar, choose (Execute) to execute the task.
      The tool opens a new editor, where you can monitor the status of the task execution. You can also monitor the status of these task executions in the SAP Data Hub cockpit (monitoring dashboard).