Workflow parameters, defined by the {workflowparameter}
macro, can be referenced by their name wrapped in @
(at) symbols.
You can use parameter references in the following situations:
Workflow parameters can be created to use different types of data for the content value.
Workflow parameters can be created and edited using workflow builder.
A workflow parameter reference
If a default value for the workflow parameter is included in the workflow
Workflow parameter references can be added to a workflow using workflow builder.
In the example below, a parameter called "The Message
" is referenced as "@The Message@
" in the body of the {set-message}
macro which is triggered by transitioning to the Stop
state.
{workflow:Parameter references} {workflowparameter:The Message} Default value for "The Message" {workflowparameter} {state:Start} {state} {state:Stop} {state} {trigger:statechanged|state=Stop} {set-message}@The Message@{set-message} {trigger} {workflow} |
If the workflow parameter is added as editable=true
{workflowparameter:The Message:editable=true} Default value for "The Message" {workflowparameter} |
On the first application of the workflow to content, a user is asked to undertake some minor setup by editing the workflow parameter value.
If the value for an
editable
workflow parameter is changed by a user
If the value for an
editable
workflow parameter is changed by the space administrator in the Parameters dashboard
The workflow parameter value may only be available for use by the workflow after a workflow process has occurred, for example, after a transition occurs from the initial workflow state.
In an approval
{approval:Check Review|selectedapprover=@Editor@,admin} |
{approval:Check Review|user=&@Editor@,admin} |
This occurs because when a workflow is first applied to a page in space mode
If you look at the Activity Report - Content for the content, you'll see that there are no workflow-specific entries listed. These pages are referred to as "unprocessed".
In the example below, we are using a workflow parameter reference, Editor, to set the pre-assigned reviewer for an approval. The workflow is applied as a space workflow.
The Initial state is added to ensure that the content is processed by the workflow and the value for the workflow parameter Editor is available for use by the Check Review approval.
{workflow:name=Parameter Reference to pre-assign a reviewer|label=wfspaceapprovalinitialassignee} {workflowparameter:Editor|type=user|edit=true} elle {workflowparameter} {state:Initial|submit=Check} {state} {state:Check|approved=Stop|rejected=Initial|taskable=true|colour=#0052CC} {approval:Check Review|user=&@Editor@} {state} {state:Stop} {state} {workflow} |
Any changes to the workflow parameter Editor value can be made in the Initial state by a user
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.
Choosing Initialize states in space tools Document Management dashboard can also be used to process the content and allow the workflow access to a workflow parameter value.
‹ Back to Value References |
---|