This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Fast-tracked Rejections and Approvals

Overview

This example shows how to allow a single reviewer to Reject whilst requiring all reviewers to Approve.

Content reviews will often mandate that several reviewers agree – either Approve or Reject – before the workflow transitions to another state.

However, in the case of Reject, it is often cumbersome to require everyone agree – if there's something wrong with the content, it needs to be rejected regardless. It is therefore very common to set up reviews so that only a single Reject is required for a transition to occur.

Default functionality – everyone must agree

This workflow has three states – Editing, Review, and Published. The default review functionality is that everyone has to agree before a transition occurs.

{workflow:name=Slow rejection}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Published|rejected=Editing}
      {approval:Review|minimum=5}
   {state}
   {state:Published|final=true|updated=Editing}
   {state}
{workflow}

We've used the minimum=5 parameter; at least 5 reviewers must agree to Approve or Reject before the transition occurs. However, if the content needs further edits, that is the case regardless of the number of rejections – so let's make it transition as soon as the first rejection comes in.

Fast-tracked Rejection

Note the {trigger} and {set-state} macros at the end of the script:

{workflow:name=Fast-tracked rejection}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Published|rejected=Editing}
      {approval:Review|minimum=5}
   {state}
   {state:Published|final=true|updated=Editing}
   {state}
   {trigger:pagerejected|approval=Review|partial=true}
      {set-state:Editing}
   {trigger}
{workflow}

Here's how it works:

  • The trigger listens for the pagerejected event
    • This event happens when someone clicks the Reject button during a review
  • approval=Review – specifies which review to monitor
  • partial=true – process each rejection as it happens
  • If the trigger requirements are met, the {set-state} macro immediately transitions the workflow to the Editing state.

The result is that a single Reject will cause transition to Editing state, whereas at least five people need to Approve before a transition to the Published state occurs.


Fast-tracked approval

You can also use the partial=true to process each approval as it happens.

This may be useful if you have a content review that allows multiple users to be assigned manually - but your practice and policy process at that milestone only requires a single approved decision.


In the above workflow popup for the Review state, all the assigned users would have to undertake the review and agree on the decision for a transition to occur.

We can fast-track the approved decision by adding a trigger for the pageapproved event and including partial=true.


{workflow:name=Fast-tracked content review}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Published|rejected=Editing}
      {approval:Review|assignable=true}
   {state}
   {state:Published|final=true|updated=Editing}
   {state}
   {trigger:pageapproved|approval=Review|partial=true}
      {set-state:Published}
   {trigger}
   {trigger:pagerejected|approval=Review|partial=true}
      {set-state:Editing}
   {trigger}
{workflow}



A single approved decision actions the transition despite three users being assigned as reviewers.



The pageapproved event trigger including the partial=true would also work even if

  • the reviewers were mandated to undertake the review
  • a minimum number of reviewers was required