Comala Workflows is now Comala Document Management. Click here for the latest documentation.


Using workflow parameters, you can extend the functionality of your workflows by including editable value references. These parameters can be set for a whole space, or entered at the individual page level. When parameters are utilized for page-level editing they can also require a value to be set by a user when transitioning from state to state in the workflow.

In this example we are going to edit the bundled Editor and Staff Approval workflow to use the parameters feature. Using parameters we will:

  1. Require users to input the appropriate review group when the workflow starts
  2. Prompt the user to enter the review groups once the draft state as been approved, but before it reaches the Ready state.

First we are going to allow parameters to be set at the page level by adding edit=true to each of them.

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

With this change complete, the user creating the page will be prompted to set the parameter values when starting the workflow.

Second, we are moving the parameter prompt to 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}

Now the user who transitions the workflow from Draft to Ready will be prompted for the parameter values.

Some things to note:  

  • The required parameters for entering a state will only be prompted if a user is performing a workflows action such as approving/rejecting or state selection. If a state is transitioned by a trigger, like a page update, the required parameter check will not be carried out.
  • Once a parameter value has been set, it will not be prompted for 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 to clear the relevant metadata value.

See also

workflowparameter macro, state macro, Transitions