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.
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.
- 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.
The basic idea is to change the email templates that the config files reference. These files are located in the jar file:
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
- 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)
- 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.
There are three types of templates (here are the English ones):
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.