Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
minLevel2
absoluteUrltrue
excludeSee also
typeflat
separatorpipe

Overview

Excerpt
hiddentrue

Two ways to use tasks to disable a review. The first way uses a precursor task state where the tasks can be set and completed. The second example uses a Value Reference as a condition to check that all tasks are complete. For the value reference method, you will need the Reporting for Confluence app in addition to Comala Document Management.

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.

For the second example using a value reference condition in the content review state.

...

 The value reference condition example requires installation of the 

...

Appfire 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.

Code Block
languagetext
themeRDark
{workflow:name=Complete the tasks}
   {state:Editing|submit=CompleteChecklist}
   {state}
   {state:CompleteChecklist|completed=Review|description=Complete all tasks to undertake the content review|taskable=true}
	   {task:Proof read content}
	   {task:TPS Report Added}
	   {task:All images show latest version}
   {state}	
   {state:Review|approved=Done|rejected=Editing} 
      {approval:Review|assignable=true}
   {state}
   {state:Done|updated=Editing}
   {state}
{workflow}


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 taskscompletedevent 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 taskable.

The transition to the content review state Review will occur when all tasks are complete.

Using a value reference condition to disable a review
Anchor
vrefmethod
vrefmethod

It's achieved using a condition on the {approval } macro.

Code Block
languagetext
themeRDark
{workflow:name=Complete the tasks}
   {state:Editing|submit=Review}
   {state}
   {state:Review|approved=Done|rejected=Editing}
      {task:Complete this to review}
      {approval:Review|assignable=true|@workflow:tasks > size@=0}
   {state}
   {state:Done}
   {state}
{workflow}

...

Info

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

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

The {approval} uses a Value Reference Condition which  condition that checks the number of tasks by querying the Workflow Supplier. If there are no tasks, the condition is met, and the review will be enabled.

Let's take a look at the condition:

Code Block
languagetext
themeRDark
@workflow:tasks > size@=0

Here's how that works:

  • The

    content between the two @ symbols is a Value Reference

    .

  • The 

     workflow: indicates we are querying the Workflow Supplier

  • The 

    tasks indicates we want to access the tasks object within the supplier – it provides information about all the tasks on the current page or blog post

  • The 

     > indicates we want to query an attribute on the tasks object, in this case, the size attribute which tells us how many tasks there are

  • We

    this is then

    equate that

    equated to a number, in this case 0

We This could be set it up so that the review is only enabled if there are is one or more tasks by changing the condition to:

Code Block
languagetextthemeRDark
@workflow:tasks > size@=!0

Adding the exclamation mark means "notNOT", so this condition is requiring requires that "the number of tasks is not zero".

Info

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.

Image Removed

Image Added

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 can edit/amend other components of the workflow using workflow builder.

See also

Workflow Authoring Guide:

User Guide: