workflow participant step to pick up custom email template | Community
Skip to main content
Level 2
December 27, 2016
Solved

workflow participant step to pick up custom email template

  • December 27, 2016
  • 6 replies
  • 1791 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

"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. 

6 replies

smacdonald2008
Level 10
December 27, 2016

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. 

prajaravAuthor
Level 2
December 28, 2016

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.

smacdonald2008
smacdonald2008Accepted solution
Level 10
December 28, 2016

"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. 

prajaravAuthor
Level 2
December 29, 2016

Thanks

prajaravAuthor
Level 2
January 9, 2017

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