Example: Workflow parameters and return values (start)
Example: Workflow parameters and return values
The Workflow Parameters and Return Values screen
appears whenever you click the Parameters action. It shows the parameters
and return values for the workflow.
An example best explains how to use the Workflow Parameters and Return Values
screen. The following figure starts this example with a subflow workflow containing variables to
hold the input parameters and the value to be returned. The example could also be a synchronous
workflow, except the parameters must be optional. Or the example could be an
asynchronous workflow, where the parameters must be optional and return values are not supported.
The following figure shows the Start task of the example workflow; the user is about to click the
Parameters action.Figure 1. Start task example
The Workflow Parameters and Return Values screen appears as shown in the
following figure. Note there are two sections: the Parameters section and the Return Values section.
Clicking Add in the Parameters section allows you to define input parameters. Clicking Add in the
Return Values section allows you to define return values. In order to have either of these the
workflow must contain some variables. Variables are defined with the Variable Definition task, which
is described in Variable definition task.Figure 2. Initial Workflow Parameters and
Return Values screen
Click Add in the Parameters section. The Workflow
Parameter Definition screen appears as shown in the following figure.Figure 3. Adding a required parameter
Give the parameter a Name. The choices in the Variable drop down are the
variables defined in the workflow. Check the Required check box if the parameter is required.
For synchronous and asynchronous workflows, this option is not available because all parameters are
optional. The following figure shows adding an optional parameter.Figure 4. Adding an optional parameter
Click the Add action in the Return Values section. If the workflow
is asynchronous, return values are not supported and will be ignored if added. When adding a Return
Value, specify its Name and select its source from the Variable dropdown list, as shown in the
following figure.Figure 5. Adding a return value
Now the Workflow Parameters and Return Values
screen looks like the following figure.Figure 6. Example of workflow
parameters and return values