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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Overview

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 6439211605 using a value reference condition in the content review state.

 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.

{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 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 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

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

{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 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 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:

@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 then equate that to a number, in this case 0

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

@workflow:tasks > size@=!0

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.


See also

Workflow Authoring Guide:

User Guide:

  • No labels