Table of Contents

Search

  1. Preface
  2. Workflows
  3. Workflow Variables
  4. Workflow Parameters
  5. Cluster Tasks
  6. Command Task
  7. Human Task
  8. Mapping Task
  9. Notification Task
  10. Gateways
  11. Workflow Recovery
  12. Workflow Administration

Developer Workflow Guide

Developer Workflow Guide

Variable Names in Expressions and Strings

Variable Names in Expressions and Strings

When you use a workflow variable 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 variable names in expression and string fields:
Field
Syntax
Example
Expression in a conditional sequence flow or in an Assignment task
  • $var:<variable_name>
    for user-defined variables
  • $var:sys.<variable_name>
    for system variables
For example, you create a workflow variable named CommandExitCode and assign the exit code output value for a Command task to the variable. You create the following expression in the conditional sequence flow that connects the Command task to a Mapping task:
$var:CommandExitCode = 0
The Data Integration Service evaluates the condition and runs the Mapping task if the previous Command task returned 0 in the exit code which indicates that the command succeeded.
String field for a Command or Notification task
  • ${var:<variable_name>}
    for user-defined variables
  • ${var:sys.<variable_name>}
    for system variables
When you enter a variable name in a string field for a Command or Notification task, you must include brackets around the variable name. For example, you create a workflow variable named MappingErrorRows and assign the number of error rows output value for a Mapping task to the variable. You enter the following text in the body of a Notification task:
Mapping failed to write ${var:MappingErrorRows} rows to the target.
If you do not include
"var:"
in the variable name, the Data Integration Service uses the name as a parameter. For example, if you enter
$CommandExitCode
or
${CommandExitCode}
, the Data Integration Service uses
$par:CommandExitCode
or
${par:CommandExitCode}
.

0 COMMENTS

We’d like to hear from you!