This documentation relates to the 5.2 release of Comala Workflows

 Documentation for other versions of Comala Workflows is available too.

Overview

Conditions allow you to specify additional prerequisite requirements for Triggers and some Transitions.

They are a set of optional parameters which can be added to the macros (listed below) to impose additional limits on when the macro will be active.

In addition, due to support for Value References, you can even create your own custom conditions by comparing metadata values.


Basic example

{workflow:name=Conditions}
   {state:Editing|approved=Done|rejected=Editing}
      {approval:Review|permission=administer|assignable=true}
   {state}
   {state:Done|final=true|updated=Editing}
   {state}
{workflow}

In the example above, only an administrator can review the content.

Compatible Macros

Note: If a macro has a parameter of the same name as a condition, the parameter – and documentation for that parameter on the macro page – takes precedence.

There is no content with the specified labels

Conditions

Condition

Value

Notes

Ver

Value Reference

A specific value, of valid type for the value reference.

Does the value of a value reference match the specified value?

There is no content with the specified labels


Warning: If used in a {trigger} macro that's listening to the pageupdated event, the trigger will not be activated if the referenced value is still being updated.

group

A comma-separated list of group names

Is the current user a member of one or more of the specified groups?

There is no content with the specified labels


When applied to the {approval} macro, you can prefix the list (not items in the list) with & (ampersand) to mandate that all users in the groups defined by the list must take part in the content review.

hasapproval

Name of an {approval}

Has an {approval} of the specified name been Approved for this content?

There is no content with the specified labels


When applied to an {approval} macro in a {state} with multiple {approval} macros, this enables you to create nested approvals. Just make sure the {approval} you are referring to is defined prior to where the condition is used.

haslabel

A comma-separated list of content labels.

Does the content have one or more of the labels specified?

There is no content with the specified labels


(info) ischildof

Title of required ancestor page.

Does the current page have a parent or ancestor page of the specified page title?

There is no content with the specified labels


(info) ishomepage

  • true – Yes, it's the home page
  • false – No, some other page

Is this page set as the space home page?

There is no content with the specified labels

See also: How to set space home page


isminorchange

  • true – Yes, the change was minor
  • false – No, watchers were notified

Did the content editor uncheck the "Notify watchers" checkbox (indicating a "minor change") before updating the content?

There is no content with the specified labels


This condition can only be used on the {trigger} macro when listening to the pageupdated or newsupdated events.

(info) isorphan

  • true – Yes, the page is an orphan
  • false – No, the page has a parent page

Is the page an orphan (no parent page)?

There is no content with the specified labels


(info) parenthaslabel

A comma-separated list of content labels.

Does the parent (or any ancestor pages) have one or more of the labels specified?

There is no content with the specified labels


permission

  • edit – user can edit the content
  • view – user can view content
  • administer – user can administrate content

Does the user have the specified permission for the content?

There is no content with the specified labels

See also: Roles and Permissions


† Irrespective of additional view restrictions resulting from Publishing

‡ Additional administrators can be defined via the adminusers parameter on the {workflow} macro.

space or spacekey

A space key.

Is the page or blog post in the space defined by the space key?

There is no content with the specified labels

Note: The space key is usually shown in URLs, or on the Space ToolsSpace Overview screen.


state

A {state} name.

Is the workflow for this content currently in the named {state}?

There is no content with the specified labels


stateindraft

A {state} name.

Is there an unpublished version of this content in the corresponding Draft Space?

There is no content with the specified labels


Note: This condition requires the Comala Publishing app to be installed.

title

Content title.

Does the content (page or blog post) have the specified title?

There is no content with the specified labels


user

Comma-separated list defining one or more users via their username or user groups.

Is the current user one of the users listed?

Note: You can include anonymous if you want to check for users who are not currently logged in to Confluence.

There is no content with the specified labels


When applied to the {approval} macro, you can prefix the list (not items in the list) with & (ampersand) to mandate that all users in the groups defined by the list must take part in the content review.
usersdefinedComma-separated list of Value References

Does the value reference define users?

This is useful when using {workflowparameter} macro to create editable value references – you can check to see if the entered values are valid user accounts.

There is no content with the specified labels

4.1
(info) – Denotes conditions which can only be used on pages, not blog posts.

Negation

Conditions are compared to values. Values can optionally be negated with a ! (pling / exclamation mark) symbol:

{...|condition=value|...} -- value must match
{...|condition=a,b,c|...} -- one or more of the values must match
{...|condition=!value|...} -- value must not match
{...|condition=!a,b,c|...} -- none of the values must match

Examples

There is no content with the specified labels

See also

Workflow Authoring Guide: