IBM Case Foundation Email Template New Line Character from Java

233 Views Asked by At

We create tasks containing multiple documents; each document has a number. I have a string Field (docNums) in the Workflow that contains each document number separated by a delimiter. I have done this as the log / email template will only accept certain types. I have edited the "stp_new.msg" template to include the docNums field. No matter what I use as the delimiter, I only get plain text. (as in <BR> shows in the email as text "<BR>".

What can I use as a delimiter to provide a newline/carriage return? Or am I looking at this all wrong?

The template is <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> The field is being created by Java, and Java is also starting the workflow (via ICN). I have tried <BR> but CF seems to change it to &lt;br&gt;, which Outlook just treats as text.

1

There are 1 best solutions below

1
On BEST ANSWER

In order for a list of strings (or String[]) to be displayed as a list inside a Process Engine Notification Template email (i.e. stp_new.msg etc.), the template will need the list set up as a String type variable and surrounded in Pre tags.

HTML template (stp_new.msg section):

<pre>{$stringContainingList}</pre>

The variable will need to be populated with the separator hex("0A")

Java (where list is a populated List):

String stringList;

for (String s : list){
    stringList = stringList.concat(s).concat(String.valueOf((char)0x0A));
}

Process Engine (where array is a string[]):

arraytostring(array,"","",hex("0A"))