The Notify Task node allows you to create a message to send to a selected environment group of users, once a series of Events or Tasks have occurred or been performed.
Type the body of the email in the Message Details property.
Formatting the email notification
HTML tags
Messages can be formatted by using common HTML tags.
Including variables
To include a Process Model variable in a Notify Task's message text, use the following syntax:
${variableName}
For example, a message informing users about a Data Stage's execution result code could be written as:
Execution has finished. Result code is: ${resultCode}
.
Depending on the execution's result, the message sent to users would be one of the following:
- Execution has finished. Result code is: 1.
- Execution has finished. Result code is: 0.
Process definition properties
- Process Name:
${process.name}
- Process Version:
${process.version}
- Process Display Name:
${process.displayName}
- Process Owning Member Id:
${process.owningMemberId}
- Process Dev Env Id:
${process.devEnvId}
(Refers to the Environment the Process Model was created in.)
Runtime process properties
- Process refStartTime:
${process.refStartTime}
- Process refEndTime:
${process.refEndTime}
- Process Id:
${process.id}
System variables
- User Organization Id:
${orgId}
- User Id:
${userId}
- User:
${user}
- EnvId:
${envId}
(Refers to the Environment the Process Model executes in) - Env:
${env}
(Refers to the Environment the Process Model executes in)
User defined variables
To refer to user defined variables, use their unique name within the dollar-sign curly brace syntax.
For example: ${variableName}
Best practices for when a variable might be null
If variables included in Notify messages using the above syntax end up null, they will be sent in their raw form to the user, which could cause confusion.
For example, if you wrote the message: The result code is: ${resultCode}
, this is exactly what would be sent to the user if resultCode
was null - simply because the Notify task does not have any other value to use.
To remedy this, create an Expression variable that uses the COALESCE
function on resultCode
in the Notify Task. For example:
nullFriendlyResultCode = COALESCE(input.resultCode, 'Execution has not occurred')
Then use that Expression variable in your message instead. For example:
The result code is: ${nullFriendlyResultCode}
.
With this setup, a null resultCode
would create the more user friendly message: The result code is: Execution has not occurred.
Since COALESCE
returns its first parameter when that parameter is not null, this setup would still also return 1 or 0 when resultCode
held these values.
Properties
Name
Specify a name for the node.
Send to Group
Click the pencil button to select the environment group to which you want to send the notification.
Message
Type a subject for the email notification.
Message Details
Type the body of the email.
Output Variables
Optionally, define output variables to customize how the Process Model executes. For more information, see Process Model variables.