Expand my Community achievements bar.

SOLVED

In Workflow email Part - How to display the current URL host name in email template?

Avatar

Level 4

In the path /etc/workflow/notification/email we have a template like

subject=Workflow notification: ${event.EventType}

header=-------------------------------------------------------------------------------------\n \

Time: ${event.TimeStamp}\n \

Step: ${item.node.title}\n \

User: ${participant.name} (${participant.id})\n \

Workflow: ${model.title}\n \

-------------------------------------------------------------------------------------\n\n

message=Content: ${host.prefix}${payload.path.open}\n

footer=\n \

-------------------------------------------------------------------------------------\n \

View the overview in your ${host.prefix}/inbox\n \

-------------------------------------------------------------------------------------\n \

This is an automatically generated message. Please do not reply.

In that template send the localhost:4502 as a host.prefix -------- I used the template in UAT as well as PRO server at that stage also it sends localhost:4502

Anyone can help me to how to get the message a respective server host name.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Set the host url prefix in OSGI config under CQ Workflow Email Notification Service  or

use Externalizer configuration settings for same as mentioned here -

chlimage_1

How to get host name in the workflow?

1677945_pastedImage_2.png

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

Set the host url prefix in OSGI config under CQ Workflow Email Notification Service  or

use Externalizer configuration settings for same as mentioned here -

chlimage_1

How to get host name in the workflow?

1677945_pastedImage_2.png

Avatar

Level 4

Hi gaurav,

     This one is not working, i made the changes in the Link Externalizer. After that also i receive the mail like localhost:4502 only.

Avatar

Level 10

Make the changes in Workflow Email Notification then it would work without any changes.

I suspect that Externalizer property would not get directly embedded by simply using {host.prefix}.  You would have to write code for it - Externalizing URLs

Avatar

Level 4

Hi Gaurav,

     Here i didn't use any code, just i used the template from AEM OOTB code those template code path is                 /etc/workflow/notification/email/. This template is triggered when the workflow triggers.

Thanks and regards,

Aravind S

Avatar

Level 2

Hi ..

     Anyone can help me to how to change the content in template, i change the template in /etc/workflow/email template after that also i'm receiving same content in mail.

Please anyone can help me to resolve that.

Thanks,

Aravind