LEGACY CONTENT
This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Introduction

K2 blackpearl can be configured to send notification e-mails to Destination Users within a process. By default, these notification e-mails are built on a notification mail template that has a K2-theme. This template can be modified so that notification e-mails are centric to your organization, etc. You can modify color schemes, fonts, layout, and any other HTML-based, non system element in the template. This article discusses high-level concepts with modifying the Notification Mail Template, including required components, and how to implement the template changes in your processes.
Note: This document assumes some knowledge and familiarity with HTML.

The Template File


The first step required is to back up the files involved. By default, the Notification Template file is located at:
 
<drive>:\Program Files\K2 blackpearl\Host Server\Bin\SourceCode.EventBus.ClientRecorder.DLL.mailTemplate




This default notification mail template can be viewed as an HTML file. An example of the format is displayed below:

Example Email
This default template, if rendered directly in a browser, includes a placeholder for the worklist item URL (“[UrlWithSN]”). This placeholder is the most important element in the template file.
Important: The SourceCode.EventBus.ClientRecorder.DLL.mailTemplate must include the “[UrlWithSN]” placeholder in the rendered text of the HTML. Failure to do so will result in failed deployment for processes attempting to create Notifications.

Modifying the Template File

  1. Once you have backed up the file (SourceCode.EventBus.ClientRecorder.DLL.mailTemplate, create a copy of the file, and add the “.html” extension.
  2. Open the “.html” copy of the file in an HTML editor (Visual Studio was used for all examples in this document). 
  3. Make your desired changes.

    Important: The SourceCode.EventBus.ClientRecorder.DLL.mailTemplate must include the “[UrlWithSN]” placeholder in the rendered text of the HTML. Failure to do so will result in failed deployment for processes attempting to create Notifications.
  4. Save the file SourceCode.EventBus.ClientRecorder.DLL.mailTemplate.html.
  5. Confirm the changes suit your needs. [optional]
  6. Copy this file to the folder “C:\Program Files\K2 blackpearl\Host Server\Bin”.
  7. Rename the existing SourceCode.EventBus.ClientRecorder.DLL.mailTemplate file (or move it out of the directory).
  8. Remove the “.html” file extension from your modified mail template.

Updating Notifications to Use the New Template


Once you have the new notification template in place, you can (re)create notifications based on this new template. Any notifications that already exist will not be updated unless you perform the following steps:
  1. In K2 Workspace, browse to the Notification Event Designer.
  2. In the left pane, expand Workflow Notifications.
  3. Select Management Events.
  4. Find the notification(s) for the process(es) you want to update. On the far-right of the screen, click on the small downward-pointing triangle.
  5. Click Delete.
  6. In the left pane, select Runtime Events.
  7. Repeat steps 4 & 5 for the same notification/process combination(s).
  8. Redeploy your process. New notifications will be created upon deployment.