Workflow Step Add a Comment

Alicia Gillberg asked on August 16, 2017 18:02

Building a custom workflow would like to add more steps that include a comment to keep track of progress within a step. For example:

  • User Creates new page
  • User Puts page into a step called "waiting for additional content"
    • user leaves a comment when putting it into this step that gets logged to the workflow history
  • User can go back and update page with a new comment such as "found images, but waiting on copy"
    • adding this comment does not change the workflow step, it just adds the comment to the workflow history.

I have searched through the documentation and have found very little information about including the commenting functionality in custom workflow steps. Has anyone done this? Thanks!

Recent Answers


Brenden Kehren answered on August 16, 2017 18:26

Have you looked at the Workflow API Examples documentation? In there it shows you can use something as simple as:

page.Publish("Your comment here");

Maybe I'm oversimplifying it?

0 votesVote for this answer Mark as a Correct answer

Alicia Gillberg answered on August 16, 2017 20:14

So there is no simple way to add the comment to the step like the standard "comment and approve" when you are in the visual workflow interface?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 16, 2017 20:23

You had asked about custom workflow steps, so I had assumed you were using the API for this. You have options already built in for commenting within the UI. You just need to click the ellipse and it will give you that option on your custom workflow step.

Image Text

0 votesVote for this answer Mark as a Correct answer

Alicia Gillberg answered on August 16, 2017 20:31

Yes, ideally I am able to add another option to that list that says "Add a comment" that gives you the pop-up to add a comment just as the "Comment and submit for approval" option does, except it keeps it in the current workflow step.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 16, 2017 20:43

So I'm seeing the whole picture now. Technically speaking in order to add a comment, you have to create a new version or advance/change the workflow position. So you'd need to add some other conditional workflow step that will handle this. Unfortunately it isn't the most elegant way of handling it but it is a way.

1 votesVote for this answer Mark as a Correct answer

Alicia Gillberg answered on August 16, 2017 20:46

I'm certainly fine creating a new version, as long as I can keep it in the same step of the workflow still!

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 16, 2017 20:54

Again, you have to have another step in the workflow for this. There is no other way to add a comment without moving within the workflow step(s) and creating another version.

0 votesVote for this answer Mark as a Correct answer

vinni nav answered on July 11, 2018 12:38

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.