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
- Space Admins – Parameters - Space Tools when your workflow is used in Space Mode
- Users – Workflow setup via the Workflow Popup (in both Space Mode and Page Mode)
For a workflow parameter to be added to the space tools Parameters tab, a default value must have been added to the workflow.
If the workflow parameter is editable
, a user will be prompted to add or confirm the workflow parameter value(s) when adding the workflow to content.
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
Parameter | Required | Default | Notes | Ver |
---|---|---|---|---|
unnamed first parameter | Name of the parameter. | 3.0+ | ||
macro body | The default value for the parameter
| 3.0+ | ||
description | The description for the parameter
| 3.0+ | ||
|
| Should this parameter be editable at the page or blog post level?
Tip: If set to
Content by label
There is no content with the specified labels | 3.0.3+ | |
|
| Parameter type
| 3.0+ | |
options | string |
List options
Content by label
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 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
andtype=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.
{workflow:name=Parameters} {workflowparameter:Review Group|type=group} confluence-users {workflowparameter} {state:Test} {approval:Review|group=@Review Group@} {state} {workflow}
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.
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.
{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|options=hr,dev,marketing,finance,global} global {workflowparameter}
All examples
-
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable