Workflow Parameters
Overview
Workflow Parameters define the input and output contract of a workflow.
Every workflow, including the Main Workflow and all Sub Workflows, can define its own set of input and output parameters. These parameters determine the data accepted when the workflow begins execution and the data returned when the workflow completes.
Workflow Parameters are configured through the Workflow Parameters dialog, which can be opened by clicking Workflow Parameters in the Designer Command Bar.
Why Workflow Parameters?
Workflow Parameters define how workflows exchange data with their callers.
- For the Main Workflow, the parameters represent the inputs supplied when the agent is executed and the outputs returned after execution completes.
- For Sub Workflows, the parameters define the values received from and returned to the Call Sub Workflow activity.
By defining clear workflow contracts, workflows remain modular, reusable, and easier to maintain.
Input Parameters
Input Parameters define the values supplied to a workflow when execution begins.
To configure Input Parameters:
- Open the Workflow Parameters dialog.
- Select the Inputs tab.
- Click Add First Input or Add Input.
- Configure the parameter properties.
- Click Save Configuration.
Each Input Parameter contains the following properties.
| Property | Description |
|---|---|
| Name | Unique name of the parameter. |
| Type | Data type of the parameter. |
| Description | Optional description explaining the purpose of the parameter. |
| Default Value | Optional value used when no input value is supplied. |
Default values are supported only for Input Parameters.
Using Input Parameters
When one or more Input Parameters are defined, the Process Data Explorer automatically displays a Workflow Inputs node.
The Workflow Inputs node contains all configured Input Parameters for the currently active workflow.
These parameters can be referenced throughout the workflow by binding them to activity properties, expressions, and conditions.
Because Workflow Inputs are scoped to the current workflow, each workflow exposes only its own Input Parameters.
Output Parameters
Output Parameters define the values returned by a workflow after execution completes.
To configure Output Parameters:
- Open the Workflow Parameters dialog.
- Select the Outputs tab.
- Click Add First Output or Add Output.
- Configure the parameter properties.
- Click Save Configuration.
Each Output Parameter contains the following properties.
| Property | Description |
|---|---|
| Name | Unique name of the parameter. |
| Type | Data type of the parameter. |
| Description | Optional description explaining the purpose of the parameter. |
Returning Output Values
Output Parameters are populated using the Set Workflow Output activity.
When the activity is added to a workflow, all Output Parameters configured for the current workflow become available for mapping.
For each Output Parameter, bind the value that should be returned when the workflow completes.
The Set Workflow Output activity is typically the final activity in the workflow before execution ends.
Workflow Parameters and Sub Workflows
Every workflow defines its own Workflow Parameters independently.
When a workflow invokes a Sub Workflow using the Call Sub Workflow activity:
- The caller supplies values for the Sub Workflow's Input Parameters.
- The Sub Workflow returns values through its Output Parameters.
This enables workflows to communicate through well-defined interfaces while remaining modular and reusable.
Workflow Parameters and Process Data
Workflow Parameters and Process Data serve different purposes.
| Concept | Purpose |
|---|---|
| Workflow Parameters | Define the data entering and leaving a workflow. |
| Process Data | Stores and manages data used internally while the workflow executes. |
Workflow Parameters define the interface of a workflow, while Process Data represents its internal working state.
Best Practices
Consider the following recommendations when designing Workflow Parameters:
- Expose only the inputs required by the workflow.
- Return only the outputs needed by the caller.
- Provide meaningful names and descriptions for all parameters.
- Use default values for optional Input Parameters where appropriate.
- Populate Output Parameters using the Set Workflow Output activity before the workflow completes.