cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow - Include comments in email notifications.

atique
Champ in-the-making
Champ in-the-making

Hi all!

There is a comment field in a workflow. I would like to include it in the email notification.

Situation : User A make a workflow task and assigned it to user B. User B will get an email notification. User B then completes the task and filled up the comment section.
            User A received a notification that the task is completed. But the comments made by user B is not included in the notification.

I tried to include the comments in the email notification code. But I don't know what parameters "comments" uses.

Any idea?

Thanks in advanced!

1 REPLY 1

douglascrp
World-Class Innovator
World-Class Innovator
You can include this piece of code into your taskListener

var taskId = "activiti$" + task.getId();
var taskComment = workflow.getTask(taskId).getProperties()["bpm:comment"];


I use that and it works.

Let me know if you need help.