Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
minLevel2
absoluteUrltrue
excludeOverview
typeflat
separatorpipe

Overview

Excerpt
hiddentrue

Define editable workflow Value References

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

A workflow parameter can be configured to a specific type of data value, for example duration period; Confluence user name(s); Confluence group name(s); text string; or a list of set option values.

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 to use it?

Optional.

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

Must be placed before the state macro(s) in the workflow markup.

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

...

Workflow parameters are useful as placeholders for values such as content expiry dates or approval reviewers. The values for these placeholders can be set differently for individual spaces or on application of the workflow to individual pages or content without the need to edit the workflow itself.

Where can parameter values be edited?

Depending on the parameter

...

Image Removed

Info
iconfalse

(warning) A value for the workflow parameter added by the user in the workflow set up dialog box may only be available for use by the workflow after a transition occurs from this initial state.

(info) When adding a space workflow, a parameter reference value may only be available for use by the workflow after a workflow process, such as a transition, occurs. For example, the initial state should not include the use of the parameter reference value for a duedate or pre-assigned reviewers for approvals to avoid blocking your workflow. Alternatively, a space admin can choose to Initialize states when applying a space workflow. This will process the pages and the workflow parameter value will be available for use by the workflow in the initial state.

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.

...

  • Image Added

(star) If a workflow parameter value is edited, the new value will be used by the workflow the next time the workflow action to retrieve the parameter value occurs.

Parameters

The workflow parameter must be defined with a unique name and the data type for its value.

...

Options allow you to set a default value, add a description and allow users to edit the workflow parameter value.

Parameter

Required

Default

Notes

Ver

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

Filter by label (Content by label)
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-workflowparameter" and label = "parameter-description" and label = "example" and space = currentSpace ( )

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 can also be required to be set upon transition to a state by setting them in the requiredparams list for that state.

Filter by label (Content by label)
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-workflowparameter" and label = "parameter-edit" and label = "example" and space = currentSpace ( )

3.0.3+

type

(tick)

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: options parameter below

Filter by label (Content by label)
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-workflowparameter" and label in ( "parameter-type" , "type-duration" , "type-user" , "type-string" , "type-group" , "type-list" ) and label = "example" and space = currentSpace ( )

3.0+

options

(info)

string

(info) Required if the parameter type is list.

List options

Filter by label (Content by label)
showLabelsfalse
max6
showSpacefalse
sorttitle
cqllabel = "macro-workflowparameter" and label = "parameter-options" and label = "example" and space = currentSpace ( )

3.0+

Panel
bgColor#DEEBFF

(info) Parameter values and unprocessed content

When adding a space workflow, a parameter reference value may only be available for use by the workflow after a workflow process occurs - such as a transition. For example, the initial state should not include the use of the parameter reference value for a duedate or pre-assigned reviewers for approvals to avoid blocking your workflow as these values may not be available until after a workflow process has taken place

To process content and ensure parameter values are set up, a space admin can also choose to Initialize states on applying a space workflow. This action will process the pages and the workflow parameter value will be available for use by the workflow in the initial state.

Events

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

  • pageparameterupdate

Examples

When the following workflow is first added to a space or page in a space, then a space admin can edit the value via Parameters - Space Tools.

  • the workflow parameters type=group and type=users can be used to define different users when adding the workflow to content

  • this can allow a workflow to be used across multiple spaces by different teams without having to change the workflow

A new value for the parameter added to the Parameters dashboard will be used when the workflow is added to the content.

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

(info) 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 Parameters dashboard.

(warning) Editing the parameter value in the Parameters dashboard will not change the value used in a workflow that has already been added and applied to content in the space.

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

Code Block
languagetext
themeRDark
{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.

Code Block
languagetextthemeRDark
{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.

Code Block
languagetext
themeRDark
{workflowparameter:OpDivision|description=Business Operating Division|type=list|options=hr,dev,marketing,finance,global}
      global
{workflowparameter}

All examples

Filter by label (Content by label)
showLabelsfalse
max100
showSpacefalse
sorttitle
excerptTypesimple
cqllabel = "macro-workflowparameter" and label = "example" and space = currentSpace ( )

See also

Workflow Authoring Guide:

User Guide:

Administration Guides: