Overview

The {workflowparameter} macro allows you to create editable Value References.

This incredibly useful feature allows you to create configurable, portable workflows that can be used across spaces. Each space then has the option to use the default value set in the workflow or to use a custom value specified for that space only.

Where can values be edited?

Depending on the parameter

For a workflow parameter to be added to the space tools Parameters tab, a default value must have been added to the workflow.

Where to use it?

Optional.

One or more {workflowparameter} macro can be put in a {workflow} macro.

Must be placed before the {state} macro(s).

Workflow builder can be used to add one or more workflow parameters to a workflow.

Parameters

ParameterRequiredDefaultNotesVer

unnamed first parameter
or name

(tick)


Name of the parameter.

3.0+

macro body

(tick)


The default value for the parameter:

3.0+
description

The description for the parameter:

  • Plain text
  • Can use any character set supported by your Confluence server – except some reserved characters

3.0+

edit


false

Should this parameter be editable at the page or blog post level?

Tip: If set to true, the value of the parameter can be used as a normal Value Reference and can be accessed via the {get-metadata} macro.

edit=true prameters can also be required to be set upon transition to a state by setting them in the requiredparams list for that state.

There is no content with the specified labels

3.0.3+

type


string

Parameter type:

  • string – text
    • Usually plain text, but can contain wiki notation depending on where the parameter value will be used
  • user – a single username or comma separated list of usernames
  • duration – an ISO 8601 duration
  • group – a single Confluence group or comma separated list of group names
  • list – a list of values to choose from – see: list parameter

3.0+
list(info)string

(info) Required if the parameter type is list.

List options:

There is no content with the specified labels

3.0+

Events

The following Events are generated when page-level parameters are updated:

  • pageparameterupdate

Examples

When this workflow is first added to a space or page in a space, the value can then be edited via Parameters - Space Tools:

{workflow:name=Parameters}
   {workflowparameter:Review Group|type=group}
      confluence-users
   {workflowparameter}
   {state:Test}
	  {approval:Review|group=@Review Group@} 
   {state}
{workflow}

Note that a default value needs to be added to the body of the workflow parameter for the parameter value to be editable in the space tools parameter dashboard.

The edit=true parameter allows end-users to edit the value at the page or blog post level, both in Page Mode and Space Mode:

{workflow:name=Parameters}
	{workflowparameter:Review Group|type=group|edit=true}
      confluence-users
   {workflowparameter}
   {state:Test}
	  {approval:Review|group=@Review Group@} 
   {state}
{workflow}

Both group and user type workflow parameters, accept comma separated lists. These lists can be then used in approval conditions:

{workflow:name=Parameters}
   {workflowparameter:Review Groups|type=group}
      group-1,group-2,group-3
   {workflowparameter}
   {state:Test}
	  {approval:Review|group=@Review Groups@} 
   {state}
{workflow}

For a type=list workflow parameter, the list options are added using the list parameter.

{workflowparameter:OpDivision|description=Business Operating Division|type=list|list=hr,dev,marketing,finance,global}
      global
{workflowparameter}

All examples

  • Page:
    State expiry dates — Using state expiry dates, defining them with metadata, and making them editable

See also

Workflow Authoring Guide:

User Guide:

Administration Guides: