How to add comments to an approval from the workflow

alexbones
Tera Expert

I have a workflow with 3 different group approvals, so 1-3 approval activities could be sent for the RITM depending on the variable answers. Is there a way to get the approval activity to add a comment to the approvals for that specific activity? I have tried adding task.comments = 'Comment Text' to the approval script, but it would then error out.

7 REPLIES 7

That's a great idea with the subflows and got me to thinking since the group approval table extends the task table and it holds the workflow name. If I created a business rule on the approval table it can go get the workflow name from the group approval it is attached to and add it as a comment.

alexbones
Tera Expert

After digging into what is saved to the approval record. I ended up not needing to do any of the subflows. It turns out the workflow activity name gets saved to the approval record if you view the XML. So all I needed to do was create a BR with the script: current.comments = "Approval for: " + current.wf_activity.getDisplayValue();

Hi Alex,

 

I have a workflow that generate approvals and depending on the action on the approval notification, the workflow progresses. I want to include a comment in the out of the box approval notification. Please can you advise how I can do it?