Developer Workflow Guide > Workflow Parameters > Parameter Sets
  

Parameter Sets

A parameter set is an object in the Model repository that contains a set of parameters and parameter values to run mappings and workflows.
When you create a parameter set, you choose a mapping or workflow to use the parameters. After you choose a mapping or workflow, you can manually enter parameters in the parameter set or you can select parameters that are already in the repository for the mapping or the workflow.
You can use parameter sets for different situations. For example, you might use a specific parameter set when you run a workflow in a test environment.
You use a parameter set with a mapping, Mapping task, or workflow. You can add one or more parameter sets to an application when you deploy the application. You can add a parameter set to multiple applications and deploy them. To use a parameter set with a workflow or mapping, you must add the parameter set to the application when you deploy the workflow or mapping.
The following image shows a parameter set that contains parameters for two mappings:
" "
The parameter set contains the following information:
Object Name
The name of the mapping, mapplet, or workflow that contains the parameter definition.
Parameter Name
The name of the parameter in the mapping, mapplet, or workflow.
Value
The value of the parameter to use at runtime. The value of the parameter in the parameter set overrides the parameter value in the mapping or workflow.
Type
The type of the parameter. Example parameter types include strings, numeric types, connections, port lists, sort lists, and date\time parameters.
Note: The parameter type that you specify in the parameter set must match the parameter type in the mapping, Mapping task, or workflow. If the parameter types do not match, the mapping, Mapping task, or workflow uses the default value for the parameter.

Creating a Parameter Set

Create a parameter set that you can use to change the runtime context for mappings and workflows.
When you create the parameter set, choose a mapping or workflow to contain the parameters. After you choose a mapping or workflow, you can manually enter parameters in the parameter set or you can select parameters.
    1. In the Object Explorer view, right-click a project and click New > Parameter Set.
    2. Enter a name for the parameter set and click Finish.
    Enter the name of the parameter set and the repository location of the parameter set.
    3. Drag the Properties panel down and view the grid to add the parameters to the parameter set.
    4. Click New > Mapping/Workflow.
    The Overview dialog box shows the parameter set name and description in the top panel. In the bottom panel is a grid where you can enter the Object Name, Parameter Name, Value, Type, and Path .
    5. In the Add Parameters dialog box click Browse to find the mapping or workflow that contains the parameters you need to include in the set.
    A list of mappings and workflows appears.
    6. Select a mapping or a workflow and click OK.
    A list of parameters from the mapping or workflow appears.
    The Add Parameters dialog box has a Browse button that you click to select mappings and workflows. when you select a mapping or workflow, the parameters appear in a list. Select which parameters to include in the parameter set.
    7. Select the parameters to include in the parameter set and then click OK.
    The mapping or the workflow name and the path appears in the parameter set. Each parameter that you selected appears beneath the object.
    The parameter set contains the m_Customer_Order object, the M_Minimum_Order_Parm, a default amount, and the decimal type.
    8. To add a parameter that is not yet in a workflow or mapping, right-click a mapping or object name and select Parameter insert.
    The Developer tool creates a parameter beneath the workflow or mapping. Change the parameter name, the value, and the type.
    Note: You must add the parameter to the mapping or workflow before you use the parameter set.

Running a Workflow with a Parameter Set

Use the startWorkflow command to run a workflow with a parameter set. The -ps argument specifies the parameter set name.
When you deploy a workflow with a parameter set, you can use a different parameter set at run time by including the parameter set argument in the command.
For example, the following command runs the workflow myWorkflow with the parameter set "MyParameterSet:"
infcmd wfs startWorkflow -dn MyDomain -sn MyDataIntSvs -un MyUser -pd MyPassword -a MyApplication -wf MyWorkflow -ps MyParameterSet