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

Bind Mapping Outputs to Workflow Variables

Bind Mapping Outputs to Workflow Variables

Bind mapping outputs to workflow variables and pass the values to other tasks in the workflow.
You might want to bind a mapping output to a workflow variable if you want the Data Integration Service to evaluate the mapping output and determine which object to run next. Or, you might want the Data Integration Service to use the mapping output value in a field in the next task.
Configure the Mapping task output values that you want to assign to workflow variables on the
Output
tab of the Mapping task Properties view. The Data Integration Service copies the Mapping task output values to workflow variables when the Mapping task completes.
The following image shows some mapping outputs on the Mapping task
Output
tab:
The Output tab image shows the system defined user outputs and the user-defined mapping outputs. The example included one persisted value called Last Order Date. It is not assigned to a workflow variable. The image shows 2 current value mapping outputs: Total Order Amount and Last Order Date. Total Order Amount is assign to a workflow variable called wf_Variable_Total_OrderAmt.
The
Output
column contains the following types of mapping outputs:
System-Defined Mapping Outputs
Built-in mapping outputs that transformations return to the mapping. The system-defined mapping outputs contain the number of source rows, the number of target rows, and the number of error rows that the mapping processed.
User-Defined Mapping Outputs
Persisted mapping output values and current mapping output values. You can bind the output values to workflow values.
Persisted Values
The user-defined mapping output values from the previous workflow run. The persisted value is a value that is in the repository from the last time the Mapping task ran. The persisted value is not the value that the current mapping aggregates.
Current Values
The user-defined mapping output values from the current Mapping task.
To assign a workflow variable to a Mapping task output, click the Variable column. Choose a workflow variable to assign the output to. In the example image, the Total_OrderAmt mapping output from the current workflow run is bound to the workflow variable
wf_Variable_Total_orderAmt
.
If a task fails, the Data Integration Service copies the general task output values but not the task specific output values to workflow variables. If the task aborts, the Data Integration Service does not copy any task output value to workflow variables.
If you assign a mapping output to a workflow variable and the mapping processes no rows, the output is NULL. The mapping task does not change the value of the workflow variable. The variable retains the same value as it was before the Mapping task ran.

Example

A Mapping task includes a number of error rows output value that captures the number of rows that the mapping failed to process. To use the data in the remainder of the workflow, you assign the number of error rows output to a workflow variable named MappingErrorRows. Then you can add the MappingErrorRows workflow variable in an expression for an outgoing sequence flow from an Exclusive gateway. If MappingErrorRows contains a value greater than zero, the gateway takes one branch. If the value equals zero, the gateway takes the other branch.

0 COMMENTS

We’d like to hear from you!