Expand my Community achievements bar.

SOLVED

workflow participant step to pick up custom email template

Avatar

Level 2

Hi ,

Getting default workflow email template mails by enabling email notification checkbox in participant step .

how to change participant step to pick up custom email template rather than default workflow email template.

default : /etc/workflow/notification/email/default/en.txt

custom : /etc/workflow/notification/email/demoportal/en.txt

 

Thanks,

Ravi.

1 Accepted Solution

Avatar

Correct answer by
Level 10

"No, i don't want to write custom workflow step for using custom email template.My use case is that AEM participant step should pick up custom email template rather than default workflow email template."

To use a custom email template in a workflow - you need to write Java logic and a MAP that is used to populate the variables in the custom template. There is no other way to reference a custom template and then to populate the variables in the template without using Java logic. 

View solution in original post

6 Replies

Avatar

Level 10

To do this - write a  custom workflow step that retrieves a custom email template. To learn how to write a custom email step - see:

 https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

To learn how to use the Java API to retrieve a custom email template - see: 

https://helpx.adobe.com/experience-manager/using/htl_email_template.html

this is the way you can get a workflow to send an email based on a custom template. 

Avatar

Level 2

No, i don't want to write custom workflow step for using custom email template.My use case is that AEM participant step should pick up custom email template rather than default workflow email template.

default : /etc/workflow/notification/email/default/en.txt

custom : /etc/workflow/notification/email/demoportal/en.txt

Thanks in Advance.

Avatar

Correct answer by
Level 10

"No, i don't want to write custom workflow step for using custom email template.My use case is that AEM participant step should pick up custom email template rather than default workflow email template."

To use a custom email template in a workflow - you need to write Java logic and a MAP that is used to populate the variables in the custom template. There is no other way to reference a custom template and then to populate the variables in the template without using Java logic. 

Avatar

Level 2

I have written custom workflow step that retrieves a custom email template and it works fine. But now i want my "Workflow notification: WorkflowCompleted" message to be also picked up from a customized path.

customized path :- /etc/workflow/notification/email/demoportal/en.txt

currently getting picked from (default) :- /etc/workflow/notification/email/default/en.txt