This site has moved to the integrated Appfire documentation and information site for our apps.
From February 2024 this site is no longer updated.
Take a look here! If you have any questions please email support@appfire.com
workflowparameter macro
Overview
The workflowparameter
macro allows you to create editable value 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
Space Admins – Parameters - Space Tools when your workflow is applied in space mode or 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.
the value set in space tools Parameters will be retrieved by the workflow only on initial application of the workflow
Changing the workflow parameter in the parameters dashboard does not change the default value set in a workflow template or the value used for this workflow that has already been applied to a document. The space parameter value is used as the default value only for subsequent new applications of this workflow in the space.
Users – via the workflow popup (in both space mode and page mode)
If the workflow parameter is configured aseditable
, a user can edit the parameter value using the ellipsis menu option in the workflow popup.Users – via the workflow popup (in both space mode and page mode)
If the workflow parameter is configured aseditable
, a user can edit the parameter value using the page tools menu option.Users – Workflow setup via the workflow popup (in both space mode and page mode)
If the workflow parameter is configured aseditable
, a user will be prompted to add or confirm the workflow parameter value(s) when adding the workflow to content
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 | Name of the parameter. | 3.0+ | ||
macro body |
| The default value for the parameter
| 3.0+ | |
| The description for the parameter
| 3.0+ | ||
|
| Should this parameter be editable at the page or blog post level?
If set to
Filter by labelThere are no items with the selected labels at this time. | 3.0.3+ | |
|
| Parameter type
| 3.0+ | |
|
|
| Required if the parameter List options
Filter by labelThere are no items with the selected labels at this time. | 3.0+ |
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 due date 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
A workflow trigger can be configured to listen for this event.
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 contentthis 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.
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.
All examples
-
Require Parameters on a state transition — Require workflow parameter values to be set before moving into a workflow state.
-
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable
-
Using workflow parameters to create reviewer teams in a space — Using workflow parameters to create teams of users for use in approvals