In the previous tutorial, we created a workflow with approvals restricted to a group and to a user.
To be able to change the group and the final approver without having to change the workflow, we use Workflow Parameters.
Workflow Parameters
Workflow parameters allows us to define placeholders in the workflow markup. These placeholders can have default values and they can be changed for entire State on which the workflow is active.
We use the {workflowparameter} to define the parameters. We are going to define a Reviewers parameter and a Editor-in-Chief parameter.
Then, we are going to refer to those parameters in the approvals as @Reviewers@ and @Editor in Chief@:
{workflow:name=Basic Workflow}
{workflowparameter:Reviewers|description=Reviewers group|type=group}
confluence-users
{workflowparameter}
{workflowparameter:Editor in Chief|description=User able to give final approval|type=user}
@user@
{workflowparameter}
{state:Draft|submit=Ready}
{state}
{state:Ready|approved=Reviewed|rejected=Draft}
{approval:Review|group=@Reviewers@}
{state}
{state:Reviewed|approved=Published|rejected=Ready}
{approval:Editor in Chief|user=@Editor in Chief@}
{state}
{state:Published|final=true|updated=Ready}
{state}
{workflow}
Because we want our workflow to work on any space and installation, we use the confluence-users group as default and the current @user@ value reference to refer to the current user.
When the workflow is first saved, the parameters initialize with the default values; however, you can change them through the Space administration:

| Only Space or Confluence administrators can change the values of Workflow Parameters. |
We have a complete workflow now. Next, let's add some messaging and email notifications. Go to Lesson 4 - Adding Triggers to find out how to handle different events.