Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Excerpt | ||
---|---|---|
| ||
For a content review with multiple assigned reviewers, increment a metadata value each time a reviewer approves the content and set a trigger to approve the page when a set number of reviewers have approved the page |
Overview
Content reviews will often assign several reviewers. Once assigned the workflow requires that all the assigned reviewers agree – either Approve or Reject – before the workflow transitions to another state.
Rather than waiting for all the assigned reviewers to approve the content, the workflow author may want to transition the workflow after receiving approvals from a set number of the assigned reviewers.
We can do this using a metadata item as a counter and incrementing the counter using the{increment-metadata}
macro.
Set and increment the approval counter to action the approval
The workflow uses the following trigger actions:
- initialize a counter value using
{set-metadata}
macro - increment the counter value using the
{increment-metadata}
macro - action the
approved
transition using the{approve-page}
macro when the counter value reaches a specified number
In the simple increment metadata example, the content is approved when three of the five assigned reviewers have approved the content.
...
Trigger | Event | Action macro | Notes |
---|---|---|---|
Initialize the metadata | statechanged |
| |
Approval counter | pageapproved | {increment-metadata} |
|
Approve the page | pageparameterupdate | {approve-page} |
|
...
An individual reviewer rejection decision on its own does not impact the metadata approval-counter
value but be aware there is an impact on the context of an approval transition. For example
- the
{approve-page}
macro is triggered when theapproval-counter
value is 3 even if one or more of the assigned reviewers have rejected the content - the
approval-counter
value is not decreased if a previous user changes their approved decision to rejected.
...