Expand my Community achievements bar.

SOLVED

Get Schduled Page Activation Date in Workflow Email Template

Avatar

Level 4

We have a workflow that will activate the page upon approval from some users. The workflow sends an email to those users whenever someone requests page publication.

 

When a page activation is scheduled later point then we need to send that date in the email. Are there any OOTB variables just like those mentioned here in Workflow Email Notification Service that I can use in the email template?

 

LeelaPavanKumar_0-1675156951057.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Leela-Pavan-Kumar 

 

We can fetch the exact date and time from comment property found in payload data of the workflow instance. This can be found under 

/var/workflow/instances/../../scheduled_activation_1/data/metaData

 

Logic to fetch the time can be written in custom workflow process step and this step can be added in 

Scheduled Page Activation workflow.

Now as we have date and time we can include that in the email which is getting triggered.

Hope it helps!!

 

Thanks,

Gaurav

 

 

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

Can you try with OOTB property

  • ${event.TimeStamp}, date and time of the event

I have also created a custom template that is here 

https://aemlab.blogspot.com/2019/06/aem-custom-templated-email.html 



Arun Patidar

Avatar

Level 4

Hi Arun,

 

I'm expecting a different thing, which is not an event.TimeStamp (returning the time stamp when the workflow is triggered). 

I need the scheduled publish date of the page. Required Value authored in the Activation date is shown in the below image

LeelaPavanKumar_0-1675173014688.png

 

Avatar

Correct answer by
Level 4

Hi @Leela-Pavan-Kumar 

 

We can fetch the exact date and time from comment property found in payload data of the workflow instance. This can be found under 

/var/workflow/instances/../../scheduled_activation_1/data/metaData

 

Logic to fetch the time can be written in custom workflow process step and this step can be added in 

Scheduled Page Activation workflow.

Now as we have date and time we can include that in the email which is getting triggered.

Hope it helps!!

 

Thanks,

Gaurav