How to capture CQ workflow comment on email notification | Community
Skip to main content
Level 2
October 16, 2015
Solved

How to capture CQ workflow comment on email notification

  • October 16, 2015
  • 3 replies
  • 2120 views

Hi Experts,

I am looking for help on how to capture CQ workflow comment which is located on workitem on default email notification. 

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 Kunal_Gaba_

You can write a custom workflow step which will get the comments as in the code sample given in the forum thread I shared earlier. And then save the read comment on the payload as custom property. In the workflow model just include this step before any participant step in which you want to send email notifications. And then in the template you can read the comment by just fetching it by the name of custom property. Ex - ${payload.previousComment}

OR Instead of using default workflow notification you can create a custom workflow step of sending emails. For email code you can reuse the Adobe ACS email service - http://adobe-consulting-services.github.io/acs-aem-commons/features/email-api.html

3 replies

Kunal_Gaba_
October 16, 2015

You will have to write custom code to read comments. Check this link - https://forums.adobe.com/thread/1156064

Dave2511Author
Level 2
October 16, 2015

Hi Kunal23,

Many thanks for your reply...I went thru on the link you sent...
It is seems Javascript and Java code, but since the email template /etc/workflow/notification/email/default/en.txt comes from this path. 

So, is it still possible to captured the comment on this .../../.../en.txt file..

Kunal_Gaba_
Kunal_Gaba_Accepted solution
October 16, 2015

You can write a custom workflow step which will get the comments as in the code sample given in the forum thread I shared earlier. And then save the read comment on the payload as custom property. In the workflow model just include this step before any participant step in which you want to send email notifications. And then in the template you can read the comment by just fetching it by the name of custom property. Ex - ${payload.previousComment}

OR Instead of using default workflow notification you can create a custom workflow step of sending emails. For email code you can reuse the Adobe ACS email service - http://adobe-consulting-services.github.io/acs-aem-commons/features/email-api.html