These examples show two approaches for preventing a content review if there are any outstanding workflow tasks.
The first example uses a precursor state to complete the tasks. The transition to the content review occurs only when the tasks are completed.
The value reference condition example requires installation of the ServiceRocket Reporting for Confluence app in addition to Comala Document Management.
Using the tasks completed transition in a precursor state to disable a review
It's achieved by adding a state as a precursor state to the Review state. This precursor state contains a completed transition that occurs when all the tasks are complete.
In this simple example, the Review state containing the content review is only available as a submit transition destination state from CompleteChecklist.
In the CompleteChecklist state no transition options are available in the workflow popup. The workflow is waiting for the
taskscompleted event for the completed transition to occur.
It's best to have at least one task added by the workflow on the transition to the CompleteChecklist state as a task will need to set as Complete in the tasks popup for the transition to occur.
You can also make the CompleteChecklist (or Editing) state
The transition to the content review state Review will occur when all tasks are complete.
Using a value reference condition to disable a review
It's achieved using a condition on the
The type of condition used in this example is one of several available only when the Reporting for Confluence app is installed.
When this workflow reaches the Review state, a single task is added. Only when that task is complete can reviewers Approve or Reject the content.
Note: users can still be assigned to the review even if there are tasks, but they cannot Approve or Reject until the tasks are complete.
How the value reference condition works
Let's take a look at the condition:
Here's how that works:
- The content between the two
@symbols is a Value Reference.
workflow:indicates we are querying the Workflow Supplier
tasksindicates we want to access the tasks object within the supplier – it provides information about all the tasks on the current page or blog post
>indicates we want to query an attribute on the
tasksobject, in this case the
sizeattribute which tells us how many tasks there are
- We then equate that to a number, in this case
We could set it up so that the review is only enabled if there are one or more tasks by changing the condition to:
Adding the exclamation mark means "not", so this condition is requiring that "number of tasks is not zero".
The Workflow Supplier condition must be added as markup using the macro editor. It cannot be added in the approval editor in workflow builder.
Once added in the markup editor, it will be displayed in the approval editor in workflow builder.
But you will not be able to change this individual approval using workflow builder with this markup added. However, you will still be able to edit/amend other components of the workflow using workflow builder.