Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel3
minLevel2
absoluteUrltrue
excludeSee also
typeflat
separatorpipe

...

  • any macro parameter (including macro bodies, where applicable) which supports value references

...

Code Block
{trigger:statechanged|state=Published}
    {set-label:@My workflow parameter@}
{trigger}

Workflow parameter value

A workflow parameter reference

  • can be set to allow a user to edit the parameter value

  • can be added to the workflow with a default value

...

Default parameter value

A workflow parameter can be added with a default value.

The default value is set when adding a workflow parameter to a workflow template.

...

The default value will be used as the workflow parameter value on the first application of the workflow to a page or blog post.

The default parameter value can also be set for each space in the space tools parameters dashboard.

The default data value must be the same as the defined type of workflow parameter.

Editable value

A workflow parameter can be added to a workflow template as editable by a user. This can be done by either

  • adding using editable=true in the workflow parameter macro markup

{workflowparameter:The Message:editable=true}

  • or, checking Editable in the Workflow Parameters editor in workflow builder

...

By default, a workflow parameter is added as editable when using workflow builder.

You must uncheck Editable attribute checkbox if you don’t want this value to be changed by a user on the page.

If the workflow parameter is set as Editable, the default value can be changed by a user on adding a workflow as a space workflow or page workflow.

...

A user can also change the value for a workflow parameter on a page or blog post with an applied workflow that includes an editable workflow parameter

  • using the Edit parameters option in the workflow inspector dialog box

...

  • using the Edit parameters option in the page tools menu if the workflow is added as a page workflow

Info

A workflow parameter added to a workflow template in a space with a default value and the Editable attribute unchecked is still editable by a space administrator in the space parameters dashboard.

Space workflow parameter

If a default value for the workflow parameter is included when the workflow is first added to/created in a space the workflow parameter and this default value is added to the space tools Parameters dashboard.

...

Its value in the space parameters dashboard can be edited by the space administrator.

...

If the space parameter value is changed by the space administrator this value will be used for all subsequent applications of the workflow in the space irrespective of the default value set in the workflow template.

A use case where this can be helpful is when using a global workflow. For example, a space admin might want to change the default value of a specific workflow parameter for use within a space. Editing the space parameter value allows the space specific parameter value to be set, while not altering the global workflow.

Changing the workflow parameter in the parameters dashboard does not change the default value set in the workflow template or the value used for a workflows that have already been applied.

The workflow parameter can be deleted from the parameters dashboard. This will not remove the workflow parameter from the workflow. Any application of the workflow will use the default value defined in the workflow itself or, if the parameter is editable, the value set by a user on the page or blog post where the workflow is applied.

...

Page parameter update trigger event

A changes in a workflow parameter can be added to a workflow template as editable by a user. This can be done by either

  • adding using editable=true in the workflow parameter macro markup

{workflowparameter:The Message:editable=true}

  • or, checking Editable in the Workflow Parameters editor in workflow builder

...

By default, a workflow parameter is added as editable when using workflow builder.

You must uncheck Editable attribute checkbox if you don’t want this value to be changed by a user on the page.

A workflow parameter added to a workflow template in a space with a default value and the Editable attribute unchecked is still editable by a space administrator in the space parameters dashboard.value generates a pageparameterupdate workflow event that can used in a workflow trigger.

For example, in a workflow the value of the workflow parameter Reviewer is used to assign the reviewer for an approval.

Code Block
{state:Review|approved=Published|rejected=In Progress|requiredparams=Reviewer}
{approval:Review|user=&@Reviewer@}
{state}

A change in the workflow parameter changes the assigned reviewer. A workflow trigger can be set to listen for this parameter update in the Review state and return the workflow to the precursor state.

Code Block
{trigger:pageparameterupdate|parameter=Reviewer|state=Review}
    {set-state:In Progress}
    {set-message} Reviewer has been updated to @Reviewer@{set-message}
{trigger}

The assigned reviewer can be checked or changed on the transition to the Review state, as the transition is set to require the parameter value for Reviewer using requiredparams=Reviewer.

To use pageparameterupdate trigger the workflow parameter must be set as Editable.

Retrieving workflow parameter values

get-metadata macro

Workflow parameter values can be retrieved using the get-metadata macro

  • the current value will be retrieved for the current page (and will not necessarily be the default value or the space parameter value)

Workflow parameter values can be added to the page properties macro using the get-metadata macro.

...

The current values for the page will be displayed and can be reported on using the page properties report macro.

...

This can be useful to display details of a process managed by a workflow, for example a release management process.

...

Tip

Workflow parameter values can be edited on a page using the workflow inspector Edit parameters option. This does not cause a page update event.

Removing a workflow parameter value on a page

When removing a workflow from a document or a space using Clear Document Activity, a user can choose to clear any stored values for the workflow parameters on the document together with (or separately from) the document activity.

...

Adding a workflow with a workflow parameter

...

Code Block
{approval:Check Review|user=&@Editor@,admin}

This occurs because when a workflow is first applied to a page as a space workflow

  •  only the link to the workflow is created (and any page restrictions, if using same-space publishing, are applied)

  • the page (or blog post) itself won't actually transition into the initial workflow state, despite it appearing that way when you look at the workflow status bar

In the Document Activity Report - Content for the content, you'll see that there are no workflow-specific entries listed. These pages are referred to as "unprocessed".

  • assigning a reviewer is a workflow process and it will use the workflow parameter value

  • pre-assigned reviewers will not use the workflow parameter value until after a workflow process had occurred such as a transition

Use an initial state to set workflow parameter value for pre-assigned reviewers

...

A space admin can also change the parameter value using the space tools Parameters dashboard before any workflow activity has taken place or a user has set up the parameter value.

...