Email Notification Plugin



This plugin sends email as part of the execution of a workflow.

Saved Parameters Description

Inputs Description

The list of inputs depends on the configuration of the EmailNotification action template.

More precisely they depend on the specification of the Message Core parameters and HTML Message Template. They both support custom variable specification using a <%= runtime_variable_name %> syntax.

If the default Message Core parameters is used, the following inputs are available:

These additional inputs are optional and always available:

Outputs Description

Supported Actions

None

Dependencies

None

Operating Instructions

How to define the message core parameters

A message template specifies how the different part of the email will be built: such a template has to be specified in the Message core parameters text box.

In its simplest form a message template includes Destinations,Subject and Message fields.

In order to specify how the message has to be built at runtime this plugin uses a simple XML structure to define the different fields:
<MessageDefinition>
    <Destinations><To>orchestrator@asperasoft.com</To></Destinations>
    <Subject>New notification%lt;/Subject>
    <Message>You have received a new notification.</Message>
</MessageDefinition>

Any of the fields can contain variables that are resolved real time by the orchestrator engine, using the notation <%= runtime_variable_name %>. Such a variable will be available as input for the step using this template instance. The message element is only visible in the final email if there is no HTML Message Template specified or the email client does not support HTML visualization.

Example: destination resolved at run time

The destination of an email can be set at run time by specifing the following template:
<MessageDefinition>
    <Destinations><To> <%= user_address %> </To></Destinations>      
    <Subject>New notification%lt;/Subject>
    <Message>You have received a new notification.</Message>
</MessageDefinition>

A step using this template has the user_address variable in the list of inputs that can be mapped.

In a real workflow a previous step or a parameter has to provide the destination address.

Example: include file information in the message body

Usually the message body is defined using the HTML Message template field, but if using HTML is not possible or not suitable, the message body can be specified in the template and it can contain run time resolved variables:
<MessageDefinition>
    <Destinations><To> user@mycompany.com </To></Destinations>
    <Subject>New notification%lt;/Subject>        
    <Message>You have received a new file: <%= file_name %> </Message>
</MessageDefinition>

A step using this template has the file_name variable in the list of inputs that can be mapped.

Default template

If the Message core parameters box is left empty, a default template is used. The default template is defined as follows:
<MessageDefinition>
    <Destinations><To> <%= To %> </To></Destinations>
    <Subject> <%= Subject %> %lt;/Subject>
    <Message> <%= Message %> </Message>
</MessageDefinition>

When using the default template all fields are inputs and only a single destination address is accepted.

How to define the HTML Message Template

The email body can be specified using standard HTML markups using the HTML Message Template text box.

As in the message template, if some values to include in the body are only available at run time, the <%= runtime_variable_name %> notation can be used.

The defined variables will then be available in the list of inputs for the steps using the template.

How to define the HTML Message Template

The email body can be specified using standard HTML markups using the HTML Message Template text box.

As in the message template, if some values to include in the body are only available at run time, the <%= runtime_variable_name %> notation can be used.

The defined variables will then be available in the list of inputs for the steps using the template.

How to attach files to an email

It is possible to attach one or more files to the generated email by simply provide their absolute paths as a comma separated list to the step in the attachment_list variable.

The files need to be locally accessible by the Orchestrator machine.