Labels
Overview
As a Confluence user, you will be familiar with the concept of labels as a method of folksonomy, but they can also be integrated with your workflows in order to
Automatically apply workflows
Enable or disable workflow functions
Add or remove labels in response to Events
Perform Actions when labels are added or removed
Make labels "sticky", which prevents their removal
Ensure compliance with content labelling policy
Automatic workflow application
To use this feature, the workflow must be added and enabled in the space document management dashboard (the workflow is applied in space mode).
Use the label
and, optionally, invertlabel
parameters of the workflow macro to specify which labels the workflow should or should not be applied to.
{workflow:name=Apply by label|label=test,testing}
{state:Test works}
{state}
{workflow}
In this example, the workflow, when applied in space mode, will automatically be assigned to any content with the label
test and/or testing.
If you added the invertlabel=true
parameter, it would be automatically applied to any content that does not have either of the labels test or testing.
In the space document management dashboard, you can use the workflow builder visual editor to add one or label content filters to a space workflow.
This workflow will be applied automatically to any content with the label hr_kpi and/or hr_obj.
Check the Invert labels option to automatically apply to any content that does not have either of the labels hr_kpi or hr_obj.
Label filters added to a workflow are displayed in the workflow listing in the document management dashboard.
The Human Resources Team kpi and objectives workflow will be applied to documents in the space that have either the hr_kpi or the hr_obj label added.
When using content labels to apply workflows across space content, all enabled workflows in the space must use a content label filter otherwise an enabled workflow in the space without a content label filter will take priority and be applied.
Enable or disable workflow features
Any macro which supports conditions can be disabled or deactivated by the haslabel
condition.
For example, you can disable state selection or reviews if labels are missing:
{workflow:name=Disable review}
{state:First}
{state-selection:states=Second|haslabel=first}
{state}
{state:Second|approved=Third}
{approval:Review|haslabel=!second}
{state}
{state:Third}
{state}
{workflow}
In this example:
Transition from
First
toSecond
state requires the content be labelled "first"The review in the
Second
state will be disabled if the content is labelled "second"
Macros which support conditions: