---
title: "Require Parameters on a state transition"
canonical: "https://support.appfire.com/space/CDML/649793313/Require%20Parameters%20on%20a%20state%20transition"
format: markdown
---
> Macro (aura-html)


> Macro (excerpt)
> 
> Require workflow parameter values to be set before moving into a workflow state.

## Overview

Using [workflow parameters](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650348884), you can extend the functionality of your workflows by including editable [value references](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649694302).

These parameters can be set for a whole space or entered at the individual page level. 

When parameters are utilized for page-level editing, a state can be configured to require a user to set a value before transitioning from that state to a destination state.

![image](media://a5d5db38-4c4f-45a2-94f4-38c0fbdf559e)

[Requiring a parameter](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649529809) for the transition to a state to occur adds a warning emoji to the workflow popup transition option to this state. For a state, the approve or reject button for an approval in the state or a submit button for a state selection

![image](media://71a938fe-5b36-45e1-82a0-5febd1f746fd)

Before the transition takes place, a user is required to

- Add a parameter value for the required parameter(s), or
- Confirm a default workflow parameter value (if set when creating the parameter)

![image](media://04946561-b875-42cb-a8f3-e9afacf972d6)

> 📝 The **Require Parameters** option is only available in the **Edit State** dialog box in the workflow builder if the workflow includes at least one workflow parameter. The parameter must be set as **editable**.

## Example of use

We are editing the [Workflows Exchange ](/wiki/spaces/CWE/pages/615776452)*[Editor and Staff Approval](/wiki/spaces/CWE/pages/615776452)* workflow to use the parameters feature.

Using workflow parameters, we can:

- Require users to input the appropriate review group when the workflow starts
- Prompt the user to enter the review groups once the **Draft** state has been approved, but before it reaches the **Ready** state.

## Workflow parameters

First, allow parameters to be set at the page level by adding `edit=true` to each workflow parameter.

```
{workflowparameter:Reviewers|description=Reviewers group|type=group|edit=true}
    confluence-users
{workflowparameter}
{workflowparameter:Editor in Chief|description=User able to give final approval|type=user|edit=true}
    @user@
{workflowparameter}
```

The workflow parameters can also be edited using the workflow builder.

![image](media://5325d8ec-97ca-4bd8-beb0-0965be49a80a)

Choose each parameter

- Check the **Editable** box to allow the workflow parameter values to be edited by a user

![image](media://c99779c8-64d6-40bf-bcda-62aa4afdfd91)

With this change complete, the user creating the page is prompted to set the parameter values when applying the workflow.

![image](media://6125cb32-9783-4c31-a980-918eadcddff4)

## Require parameters for a state

Second, add the parameter prompt for the **Ready** state transition by adding a `requiredparams` attribute to the **Ready** state definition.

```
{state:Ready|approved=Reviewed|rejected=Draft|requiredparams=Editor in Chief,Reviewers}
```

This can also be done by editing the **Ready** state using the workflow builder:

![image](media://c67c0e29-61e7-42d8-bd5b-42a4765f38e5)


Now, the workflow state dialog box in the **Draft** state displays a warning icon on the **Submit** button.

![image](media://b16bc372-066f-49af-b109-d93522ab36f4)

The user who transitions the workflow from **Draft** to **Ready** is prompted for the parameter values.

![image](media://c70d7e40-cf7f-4ee3-ba31-3d1b0af6f08c)


> 📝 The required parameters for entering a state will only be prompted if a user is performing a workflow action, such as approving or rejecting an approval, or selecting a destination state in a **submit** or **select** transition.

Once a parameter value has been set, its valid is not prompted again unless the saved value is removed.

If you want to prompt the user to enter a value every time the workflow resets, you can add a trigger with a `set-metadata` action macro to clear the relevant metadata value for the parameter.

If a state is transitioned by a trigger, like a page update, the required parameter check is not carried out.

## See also

**[User Guide](https://appfire.atlassian.net/wiki/spaces/CDML/pages/648907144)**

- [Require parameters (workflow state dialog box)](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649529809)

**[Workflow Authoring Guide](https://appfire.atlassian.net/wiki/spaces/CDML/pages/648611901)**

- [Transitions](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649563425)
- [state macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/649531575)
- [workflowparameter macro](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650348884)