Highlighted

AEM 6.2 classic : OOTB workflow mail template doesn't give proper data for workflow completed notification.

cquser1

03-09-2018

Hi All,

I have created a test workflow, which just has 1 "participant step" as seen below. Also, to the OOTB template "/etc/workflow/notification/email/default/en.txt/", we jsut have added additional ${item.data.comment} to get the comments.

1] While triggering workflow on the page, if any comments are provided they do not appear in the participant step. For this, by adding custom process code we are able to get the comments in email.

if (processArgs.equalsIgnoreCase("custom")){

if(workflowData.getMetaDataMap().containsKey("startComment")){

workflowMetaData.put("comment", workflowData.getMetaDataMap().get("startComment"));

}

}

2] Additional info : While moving from one participant step to another[tested in another sample workflow], all the properties in the OOTB template gets populated fine in email, without issues.

3] After providing the approval from this participant step, WorkflowCompleted mail is triggered. This does not have values for two properties properly :

Step: [Information not available]

CustomComment : ${item.data.comment}

Not sure, how to get these two properties too, populated correctly in the WorkflowCompleted  that is triggered on workflow completion.

Any thoughts/pointers/reference code will be really helpful.

Capture.PNG

Replies

Highlighted

smacdonald2008

04-09-2018

Let me get this straight - when you have a simple workflow with a few steps - the comments appear fine in the email. But when you put in an Approve step - and if approved the comments are lost.

Highlighted

smacdonald2008

04-09-2018

This could be a bug that has never been seen. I recommend opening a ticket. The comment value should be retained throughout the entire workflow.

Highlighted