Using labels when applying a workflow in space mode

Using labels when applying a workflow in space mode

Overview

In Space mode, an enabled workflow applies to all the documents in the space unless the workflow includes filters to apply it to specific content labels or content types.

There are several ways labels are used when filtering the space workflow.

The space workflow is also applied based on the workflow scope (global or space). For example, a global workflow active in a space without a content label filter is applied in preference to any other global scope workflow filtered by label and all active space scope workflows.

Use content labels to filter the active space workflow

One or more content labels can be added to a space workflow. When active, the space workflow is applied to documents with one or more of these labels.

Labels to use as filters can be added by editing the workflow in the workflow builder.

Worfklow builder Edit workflow showing two example content labels.

The workflow above can only be applied to content with one or more of the specified labels—process or procedure.

This feature uses the label parameter. In the template markup, this parameter is added to the workflow macro:

{workflow:name=Require labels|label=process,procedure} {state:Test} {state} {workflow}

Exclude labels - apply to documents without the specified labels

If you want the opposite effect, where the workflow is only applied to documents without any of the specified labels, check the Invert labels option.

Worfklow builder Edit workflow showing two example content labels and the Invert labels option selected.

The workflow above is applied to all documents that do not have either of the specified labels - process or procedure.

In the workflow template markup, this adds the invertlabel=true parameter:

{workflow:name=Exclude labels|label=process,procedure|invertlabel=true} {state:Test} {state} {workflow}

Sticky labels - prevent the removal of your content filter labels from documents

You can edit the workflow to set labels as sticky labels to ensure that one or more labels aren't changed once the workflow is applied.

Open the Advanced option in the Edit Workflow box in the workflow builder and add labels to the Sticky labels box.

workflowbuilder-editworkflow_requirelabels_advancedsection_stickylabels.png

The workflow above does not allow either the process or procedure label to be removed if they are already present.

In the template markup, this adds the stickylabels parameter:

{workflow:name=Required labels|label=process,procedure|stickylabels=process,procedure} {state:Test} {state} {workflow}

Administrators and Admin users set by the workflow can remove stickylabels.

Prevent the addition of labels used as content label filters using triggers

If you have a workflow that uses the invertlabel=true parameter, you can ensure those labels are not added by using triggers listening for labeladded events and then removing the labels using a  trigger action:

{workflow:name=exclude labels|label=process,procedure|invertlabel=true} {state:Test} {state} {trigger:labeladded|label=process} {remove-label:@label@} {trigger} {trigger:labeladded|label=procedure} {remove-label:@label@} {trigger} {workflow}

In the example above, adding the label process or procedure triggers an action that removes it again.

Filter by content type - page or blog posts

By default, a workflow is applied to both pages and news (blog posts). When editing the workflow, you can filter it using the Content Types checkboxes.

Open the Advanced option in the Edit Workflow box in the workflow builder and check or clear the Content Types.

workflowbuilder-editworkflow_requirelabels_advancedpage_blogposts_contentfilter_checkboxes.png

You must have at least one content type selected.

In the template markup, this uses the content parameter to limit workflow to either pages or news (blog posts):

{workflow:Filter to pages|content=pages} {state:Must be a page} {state} {workflow}
{workflow:Filter to news (blog posts)|content=news} {state:Must be a blog post} {state} {workflow}

When the content parameter is not added to the workflow template, by default, the workflow is applied to both pages and blog posts.

In the template markup examples, the first workflow can only be applied to pages, while the second can only be applied to news (blog posts).

 

Need support? Create a request with our support team.

Copyright © 2005 - 2025 Appfire | All rights reserved.