[CQ5.4 Workflow] Approve OR Reject (send back to author) setup

This is a sample workflow model which demonstrates the “Approve” and “Reject” steps.

Basically, it will work as follows: Once the author is done with the changes, he/she can send the page for review which means author starts the ‘Approval workflow’. Approver/Reviewer reviews content and can either approve or reject the changes. If approved, content is published immediately else goes back to the initiator of the workflow.

Setup Users and Groups

Setup the following groups with appropriate permissions:

1. Author – Read-write access to the page.

2. Approver – Only read access to the page.

Let’s say, userA belongs to the “Author” group and userB belongs to the “Approver” group.

 

Setup the Workflow Model

First step is “Review Content”. For this, use the ‘Workflow – Participant Step’

 

In the ‘User/Group’ tab, assign the appropriate user or group. For this example, use the ‘Approver’ group.

Click ‘OK’ to save the changes.

 

Then add the Workflow РOR Split. Add the following two steps to the OR split:

1. Approve – This action will activate the page. Basically, it uses the WCM Workflow – Activate Page/Asset step.

 

2. Reject – This action will send the page back to the initiator of the workflow. It uses the Workflow – Dynamic Participant Step with the ‘Workflow Initiator Participant’ ECMA script as shown below:

 

Overall, the workflow model looks like this:

 

 

Don’t forget to hit the save button:

 

 

Now, here are some screenshots to see the process in action:

Open the page which needs to be sent for approval.

In the Sidekick – Workflow tab, choose ‘Sample Approval Workflow’ and then click on ‘Start Workflow’ button.

 

This will send the page to approver’s inbox.

Approver opens the page and reviews content. If looks ok, clicks Workflow tab in Sidekick and completes the ‘Review content’ step.

 

 

Hitting the ‘complete’ button opens a dialog to choose ‘Approve’ or ‘Reject’ as follows:

Approver chooses one of the options and click ‘OK. If ‘Approve’ then page gets activated and workflow comes to an end.

If ‘Reject’, pages goes to the inbox of the initiator of the workflow.

Once the page is in initiator’s inbox, they have two options: end the workflow or make changes to the page and send it for approval again.

 

1. ‘Complete’ – This will end the workflow. Author can take time to make the corrections etc and restart the workflow at a later point.

2. ‘Step Back’ – Author can make the appropriate corrections/changes and send it back to the approver. For this, author has to click the ‘Step Back’ button which opens the dialog to choose the previous step – ‘Review Content’.

 

Clicking ‘OK’ in the above dialog sends the page back into the ‘Approver’s inbox for further action to approve or reject and the above steps repeat.

Feel free to add other scenarios of approval / reject setup in the comments!