Custom Notification Templates

Overview

Custom notification templates can be used instead of the default WorkflowGen notification templates. These templates can be created in HTML or as plain text and can also use many regular WorkflowGen macros to display process-specific information.

Process

Process data

For WorkflowGen to use the custom notifications, they must be added to the process data as FILE type.

To do this, first create new process data for each template to be used, then browse to and attach the custom template to be used.

Action notifications

WorkflowGen can use an unlimited number of custom notifications per action. To add a custom notification, follow the steps below.

On the Notifications tab, in the Additional section:

  1. Select the event that will cause the notification.

  2. Select the recipient of the notification.

  3. Select the process data that contains the attached notification template. You can choose the custom template created or use the default WorkflowGen template.

Templates

To create a template, use a text editor to create a file as follows:

Subject

To create a custom subject line for the templates, the first line in the HTML template must be "SUBJECT:" followed by the subject line to display. Macros may also be used here.

HTML

Create an HTML page that will act as a template for the email. In order to support Unicode, we recommend saving the file using UTF-8 encoding and adding a UTF-8 character set in the header of the HTML page, as shown below. CSS styles can also be applied within the HTML page.

Embedded images

Add images to standard notification templates (custom or built-in e.g. \wfgen\App_Data\Templates\Emails). Image tags whose source (src="") begin with http are not included in the email and simply related. Image tags whose source begins with a drive letter (e.g. C:\) will be included in the email and result in a larger size email. However a connection to the server is not required.

Examples:

The image is included in the message:

<img src="C:\inetpub\wwwroot\wfgen\App_Themes\Default\portal\images\activity_s.gif">

The image is not included in the message:

<img src="http://localhost/wfgen/App_Themes/Default/portal/images/activity_s.gif">

Sample HTML template

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>My Title</title>
    <style type="text/css">
        body
        {
            font-family:Arial;
        }
    </style>
</head>
<body>
    <table width="90%">
    <tr>
        <td>
            <img src="C:\inetpub\wwwroot\wfgen\App_Themes\Default\portal\images\activity_s.gif"> <WF_PROCESS_INST_NAME>
        </td>
    </tr>
    <tr>
        <td>
            Manager Decision
        </td>
        <td>
            <WF_PROCESS_INST_RELDATA_VALUE.MGR_DEC>
        </td>
    </tr>
    <tr>
        <td>
            Date
        </td>
        <td>
            <WF_SYSTEM_DATE>
        </td>
    </tr>
    <tr>
        <td>
            Launch the Action
        </td>
        <td>
            <a href="<WF_LINK_ACTIVITY_INST_LAUNCH>">link 1</a>
        </td>
    </tr>
    <tr>
        <td>
            Go To Action Follow-Up Form
        </td>
        <td>
            <a href="<WF_LINK_ACTIVITY_INST_FORM>">link 2</a>
        </td>
    </tr>
    <tr>
        <td>
            Go To Request Follow-Up Form</td>
        <td>
            <a href=" <WF_LINK_ACTIVITY_INST_FORM> ">link 2</a>
        </td>
    </tr>
    <tr>
        <td>
            Go To Request Follow Up Form
        </td>
        <td>
            <a href="http://YOURSITE/wfgen/Show.aspx?QUERY=PROCESS_INSTANCE_FORM&ID_PROCESS_INST=<WF_PROCESS_INST_ID>">Request Link</a>
        </td>
    </tr>
    </table>
</body>
</html>

Text

A non-Unicode text notification template can be created using a text editor such as Notepad and must be saved as a *.txt file.

Sample text template

SUBJECT: My Custom Subject line

Manager Decision: <WF_PROCESS_INST_RELDATA_VALUE.MGR_DEC>

Date: <WF_SYSTEM_DATE>

Launch the Action: <WF_LINK_ACTIVITY_INST_LAUNCH>

Go To Action Follow-Up Form: <WF_LINK_ACTIVITY_INST_FORM>

Go To Request Follow Up Form: http://YOURSITE/wfgen/Show.aspx?QUERY=PROCESS_INSTANCE_FORM&ID_PROCESS_INST=<WF_PROCESS_INST_ID>

Macros

In addition to the regular macros that are available, the following macros may also be used in the custom notification templates.

Last updated