Modifying the task notification templates

Follow

Users of IBM BPM can modify their profile to indicate they want to receive an e-mail whenever a task is assigned to them.  Frequently customers want to customize this functionality to create an e-mail that has a look and feel that is in better alignment with their corporate standards.  While there is no IBM provided procedure for altering the task notification templates in recent BPM releases, it is possible to do so.

OVERVIEW:

The e-mail templates are located within a BPM product JAR file, so in order to change the e-mail template you need to unzip the jar file, alter the template, re-zip the jar file and push the update to the server(s).

The best way to do this is to put the original version of the files under source control and then make your changes so that any future product changes can be handled through some sort of merge mechanism.

IMPORTANT CAVEATS:

  • IBM does not support this type of operation.  Use at your own risk.
  • If your environment consists of multiple servers, you will need to update the jar file on each server.
  • This file is not associated with a profile.  As such all servers that are referencing the above jar file in their class path will use the altered template.
  • All changes should be noted in change management documentation or checked into source control as product upgrades can overwrite these files and any resulting changes would be lost.

STEPS:

The basic idea is to change the email templates that the config files reference. These files are located in the jar file:

  • ...\BPM\Lombardi\process-server\lib\procsrv_resources.jar

You can un-jar this file, change the appropriate externalmailnoprocess_XX.html and externalmailprocesslink.html, then re-jar the file.

  • Locate the directory in which procsrv_resources.jar is located. The directory should be something similar to
    • ...\BPM\Lombardi\process-server\lib\procsrv_resources.jar.
  • Backup the original file (or add to source control system).  This is to ensure we can restore the original templates.
  • Unjar the file or, just pull out (I use 7zip for this)
    • externalmailnoprocess_XX.html
    • externalmailprocess_XX.html
    • externalmailprocesslink_XX.html
  • From there, you can modify the templates as you see fit.  The templates are HTML with placeholder variables.  The specifics of the placeholders are not documented anywhere so you will need to reverse engineer what you need from the current template.
  • Now, you need to reverse the process and re-jar or add the files back into the existing jar file.
  • Put the jar file back in the same location with the original file.
  • A BPM restart is needed for the changes to take effect.

ADDITIONAL INFORMATION:

There are three types of templates (here are the English ones):

  • externalmailnoprocess_en.html
  • externalmailprocess_en.html
  • externalmailprocesslink_en.html

Only the "externalmailnoprocess" and "externalmailprocesslink" are used. The first is if a task was started outside of a process and the second is for a task started from a process.

Have more questions? Submit a request

Comments

  • Avatar
    Peter

    I want to know the different between externalmailprocess_en.html and externalmailprocesslink_en.html these two files? Can you give me simple explanation?

  • Avatar
    Dave Rosen

    Hi Peter,

    First, thanks for the question.

    The process entry (externalmailprocess) is used if the task send has an associated process. It uses javascript and a button to start the process, but since this does not work with some email clients that disable javascript, there is an alternative.

    The process link entry (externalmailprocesslink) is used if the above javascript issue exists. The externalmailprocesslink uses a URL link instead of javascript.

    As always, if you have additional questions, please let us know.

Powered by Zendesk