Developer Workflow Guide > Workflow Parameters > Where to Use Workflow Parameters
  

Where to Use Workflow Parameters

Use a workflow parameter in an expression in a conditional sequence flow when you want the Data Integration Service to evaluate the parameter value and then determine which object to run next. Use a workflow parameter in an object field when you want the Data Integration Service to use the parameter value for the field.
Depending on the expression or task field, you can select or type the workflow parameter name.
The following table lists the objects and fields where you can use workflow parameters:
Object
Tab or Dialog Box
Fields
Select or Type
Workflow
Advanced tab
Tracing level
select
Sequence flow
Condition tab
Condition
both
Assignment task
Assignment Expression Editor dialog box
Expression
both
Command task
Command tab
Command
both
Command task
Input tab
Advanced configuration properties assigned to task input
select
Human task
Input tab
Number of items processed
select
Mapping task
Input tab
User-defined mapping parameters
Advanced configuration properties assigned to task input
select
Notification task
Notification tab
Dynamic email content
type
Notification task
Email Properties dialog box
Dynamic recipients
Dynamic email addresses
select
Notification task
Email Properties dialog box
Dynamic email content
both

Assigning Workflow Parameters to Task Input

Mapping tasks, Human tasks, and Command tasks include an Input tab where you specify the workflow parameters that the task requires.
On the Input tab of a Mapping or Command task, you can assign task configuration properties to task input to define the value of the property in a workflow parameter. The Advanced tab for a task lists the task configuration properties.
On the Input tab of a Mapping task, you can also assign some user-defined mapping parameters to workflow parameters. You can assign a distinct value to a user-defined mapping parameter that appears multiple times in the workflow.
Note: Workflow parameter types must be either a connection type or a string type.
    1. Select a Mapping, Command, or Human task in the editor.
    2. Click the Properties view.
    3. For a Mapping task or a Command task, click the Advanced tab to assign an advanced configuration property to the task input.
    In the Value column for a property, select Assigned to task input.
    4. Click the Input tab.
    5. At the top of the Input tab, search for the property that you want to update.
    You can use wildcard characters in the search string. The string is not case sensitive.
    6. Click the Value column for the property.
    7. In the Value column, choose to assign the property to an existing workflow parameter, to a new workflow parameter, or to a literal value.
    8. To clear an input assignment, select an input and click Clear. Or, click Clear All to clear all input assignments.

Parameter Names in Expressions and Strings

When you use a workflow parameter name in an expression or a string field, you can select the name from the Inputs tab or you can type the name using the required syntax.
The following table shows the required syntax for workflow parameter names in expression and string fields:
Field
Syntax
Example
Expression in a conditional sequence flow or in an Assignment task
$par:<parameter_name>
For example, you create the following expression in a conditional sequence flow:
$par:Connection=SourceConnection
The Data Integration Service evaluates the condition and runs the connected task if the parameter value is SourceConnection.
String field for a Command or Notification task
${par:<parameter_name>}
When you enter a parameter name in a string field for a Command or Notification task, you must include brackets around the parameter name. For example, the following command in a Command task uses a workflow parameter named SourceDirectory to define the source directory from which the command copies a file:
copy ${par:SourceDirectory} H:\marketing\
If you do not include "par:" in the parameter name, the Data Integration Service uses the name as a parameter. For example, if you enter $SourceDirectory or ${SourceDirectory}, the Data Integration Service uses $par:SourceDirectory or ${par:SourceDirectory}.

Escape Character in Strings

When you use a workflow parameter name in a string field, you can use an escape character so that the Data Integration Service displays the workflow parameter name in the string instead of resolving the parameter value.
Use the backslash (\) as an escape character before the ${...} syntax for workflow parameter names.
For example, you have a workflow string parameter named myParameter with a value of "test". You enter the following text in the body field for a Notification task:
Parameter \${par:myParameter} has a value of ${par:myParameter}
When you run the workflow, the Data Integration Service displays the following string in the body field of the email:
Parameter ${par:myParameter} has a value of test
If you use a workflow parameter name within a directory path, you can use the escape character before the backslashes in the directory path.
The following table provides examples using the escape character with a parameter name in a directory path:
Syntax in String Field
Output Value
Description
C:\${par:myParameter}
C:${par:myParameter}
The Data Integration Service displays the parameter name as a string.
C:\\${par:myParameter}
C:\test
The Data Integration Service reads the backslash as a regular character and resolves the parameter to its value.
C:\temp\\${par:myParameter}
C:\temp\test
The Data Integration Service reads the backslash as a regular character and resolves the parameter to its value. No escape character is required for the first backslash.
C:\\\${par:myParameter}
C:\${par:myParameter}
The Data Integration Service reads the backslash as a regular character and displays the parameter name as a string.
C:\\\\${par:myParameter}
C:\\test
The Data Integration Service reads two backslashes as regular characters and resolves the variable to its value.

Nested Parameters

The Data Integration Service resolves one level of parameter values. The Data Integration Service does not resolve parameter values that are nested within another workflow parameter or variable.
For example, you assign the following workflow parameters these values in a parameter file:
When you use Parameter3 in an expression or task field, the Data Integration Service does not resolve the nested parameters Parameter1 and Parameter2 to the value of 7. Instead, the Data Integration Service uses the following string value for Parameter3:
${par:Parameter1} + ${par:Parameter2}