States act like milestones in your workflow – key stages of your process where something has to happen.
Let's assume we've got a really simple content production process where content is edited, then it goes through a review, and if the review is approved the content is published.
States can handle several common Transitions directly, namely:
submit– a direct transition to one state
updated– an automatic transition which occurs when content is edited
rejected– transitions triggered by completion of Reviews
expired– triggered when a state expires – see Expiry Dates
completed– triggered when the last remaining task is completed – see Tasks
For approved, rejected and submit transitions Workflow Parameter can also be required to be entered.
Reviewers must decide whether to approve or reject the content, and once they are in agreement the state will transition to the
rejected state as applicable.
A state can be configured to require the setting of one or more workflow parameter values. The value must be set before a transition into the state can occur. The workflow popup will display a warning for the transition in any state that has this state as a destination.
The Reviewed state in the markup below would require the setting of the value of the workflow parameter
pagefield1 before a transition can occur into the Reviewed state.
In our example, the transition option is to a single state from the Draft state to the Reviewed state the Submit button displays a warning icon.
Choosing the Submit button opens a text box to enter the value of the required workflow parameter.
The required parameters for entering a state will only be prompted if a user is performing a workflow action such as approving/rejecting content or making state selection. If a state is transition is actioned by a trigger, like a page update, the required parameter check for the destination state will not be carried out.
Once a parameter value has been set in a workflow it will not be prompted for again unless the saved value is removed.
Required parameters can be added to a state using the state editor in workflow builder.
Workflow parameters added to the workflow will be available as options to the dropdown menu.
Tasks can be created automatically when a workflow enters a state, and states can automatically transition when tasks are completed.
In the example, a task to Check links is created when entering the Review state, and when that task is
completed a transition will occur to the Publish state.
Note that tasks cannot be created this way in the initial state (the Editing state in our example).
For the task to be created, the state must be transitioned to from another state; it must be entered. When a workflow is first applied to content, the initial state is not entered and thus any tasks it contains won't be created.
States can be designated as a "final", Published state for the content.
States can be given expiry dates. There are many uses for this, but one of the most interesting is to trigger periodical reviews of published content:
It's a really simple way to ensure that documentation doesn't go stale.
By default, page watchers will only be notified if a state expires.
Additional notifications can be added if desired – see Notifications.
pagestatus macro — Display workflow state lozenge
set-state macro — Immediately transition to a state
set-state-expiry macro — Set state expiry duration
state macro — Define workflow states & basic transitions
state-selection macro — Specify direct state transitions
|State's Task Behaviour||Should incomplete tasks be carried over to the next state during transitions?|
|State Expired Notification||Should page watchers receive a notification when a state expires?|
Adding Multiple Reviews — Add multiple reviews to a content review, set assignee requirements and review dependencies
Adding page activity to email — Include page activity report, or a link to it, in custom email notifications
Assignment Examples — Define who can take part in, or be assigned to, a content review.
Attachment events — Triggering events when attachments are created, updated or removed.
Blog Post Events — Workflow events associated with blog posts
Communardo Metadata for Confluence app — Using the Communardo metadata as value references in a workflow - including use in a custom condition for a trigger macro
Customise Approval Buttons — How to change captions of the Approve and Reject buttons created by the
Expiry Dates — States, tasks, and messages can be set to expire on a certain date or after a certain amount of time
Fast-tracked Rejections and Approvals — How to require everyone to Approve, but only need one person to Reject
Message notification styles — Test the
styleparameter of the
Require Parameters on State Transitions — Require workflow parameter values to be set before moving into a workflow state.
Reviewer Authentication — This example shows how to authenticate reviewers during a content review.
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable