Conditions

Overview

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

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

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

 

Basic example

{workflow:name=Conditions} {state:Editing|approved=Done|rejected=Editing} {approval:Review|group=confluence-administrators|assignable=true} {state} {state:Done|final=true|updated=Editing} {state} {workflow}

In the example above, only a user who is a member of the confluence-administrators group can review the content.

Compatible Macros

If a macro has a parameter with the same name as a condition, the parameter as defined in the macro takes precedence.

For example, user and group are parameters defined in the approval macro.

 

Conditions

Condition

Value

Notes

Ver

Condition

Value

Notes

Ver

Value Reference

A specific value. This must be a valid datatype for the value reference.

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

For example, @title@=<pagename> where <pagename> is the page title.

Conditions using value references can also be set when using a third-party app:

 

If used in a trigger macro that's listening for the pageupdated event, the trigger is not activated if the referenced value is still being updated.

One invalid parameter in a list of users in a condition disables the transition for the other listed users. The non-existent parameter value is a blocker for an approval or a state-selection transition.

group

A comma-separated list of group names

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

 

When applied to the approval macro, it is a parameter of the approval macro - it is not used as a condition.

For example, 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?

 

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?

 

initial

  • true – Yes, this listens ONLY for the first occurrence of a transition to a specified state for the content

  • false – No, the filter listens for all occurrences of transitions to the specified state

Is this action only for the initial occurrence of the named state for the content?

  • initial is unique to the statechanged event used in a trigger macro

  • initial=true acts as a filter to make the trigger act only on the first occasion that a state is entered for a given piece of content

  • initial=false listens to every time the workflow transitions to the state specified by the state parameter.

 

The use of initial is as a parameter of the trigger macro.

The primary use of the initial parameter is to perform one-time initialization actions for a given document. For example, on the first review of a document, you might want to send out an additional email or set some metadata.

ischildof

Title of required ancestor page.

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

 

ishomepage

  • true – Yes, it's the home page

  • false – No, some other page

Is this page set as the space home page?

Filter by label

There are no items with the selected labels at this time.

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?

The isminorchange parameter can be used with the StiltSoft Talk app for any change in an inline comment on a page or blog post.

 

This condition can only be used in a trigger macro when listening to either the pageupdated or newsupdated event.

isorphan

  • true – Yes, the page is an orphan

  • false – No, the page has a parent page

Is the page an orphan (no parent page)?