Expand my Community achievements bar.

SOLVED

Workflow email template, comment display

Avatar

Level 1

Hello,

 

I having an issue with the var "${item.data.comment}" in a mail template. 

Based on this documentation : https://experienceleague.adobe.com/docs/experience-manager-64/administering/operations/notification....

I have customized the template used for the mail sent for each workflow participant step where the "email" box is checked.

 

The header is now :

header=-------------------------------------------------------------------------------------\n \
Time: ${event.TimeStamp}\n \
Step: ${item.node.title}\n \
User: ${participant.name} (${participant.id})\n \
Workflow: ${model.title}\n \
Comment: ${item.data.comment}\n \

The comment line is working for each step but the first one. 

For the first step, I receive this mail : 

-------------------------------------------------------------------------------------
 Time: Wed Oct 27 10:52:13 CEST 2021
 Step: Demande de validation DCP
 User: Polo Administrator (admin)
 Workflow: CNP - DCP Validation
 Comment: ${item.data.comment}
 -------------------------------------------------------------------------------------

 

Then, for an other step : 

-------------------------------------------------------------------------------------
 Time: Wed Oct 27 11:05:39 CEST 2021
 Step: Demande de validation DCP
 User: Polo Administrator (admin)
 Workflow: CNP - DCP Validation
 Comment: Commentaire pour dire KO
 -------------------------------------------------------------------------------------

 

Is there anyway to prevent the mail template to display a var that is not initialized ? 

 

Many thanks,

Grégory 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
2 Replies

Avatar

Correct answer by
Community Advisor

Hello @Greg_Pai 

 

Please check below thread and see if that works:

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-2-classic-capture-co... 

 

thanks 

Avatar

Community Advisor

Hi,

Not sure but try adding if helps

Comment: ${item.data.comment ?item.data.comment : ''}

I did not tried this, this is just an assumption, it may not work because workflow template is not htl. But you can try.



Arun Patidar