Table of Contents

Search

  1. Preface
  2. Understanding Pipeline Partitioning
  3. Partition Points
  4. Partition Types
  5. Pushdown Optimization
  6. Pushdown Optimization and Transformations
  7. Real-time Processing
  8. Commit Points
  9. Row Error Logging
  10. Workflow Recovery
  11. Stopping and Aborting
  12. Concurrent Workflows
  13. Grid Processing
  14. Load Balancer
  15. Workflow Variables
  16. Parameters and Variables in Sessions
  17. Parameter Files
  18. FastExport
  19. External Loading
  20. FTP
  21. Session Caches
  22. Incremental Aggregation
  23. Session Log Interface
  24. Understanding Buffer Memory
  25. High Precision Data

Advanced Workflow Guide

Advanced Workflow Guide

Predefined Workflow Variables

Predefined Workflow Variables

Each workflow contains a set of predefined variables that you use to evaluate workflow and task conditions. Use the following types of predefined variables:
  • Task-specific variables.
    The Workflow Manager provides a set of task-specific variables for each task in the workflow. Use task-specific variables in a link condition to control the path the Integration Service takes when running the workflow. The Workflow Manager lists task-specific variables under the task name in the Expression Editor.
  • Built-in variables.
    Use built-in variables in a workflow to return run-time or system information such as folder name, Integration Service Name, system date, or workflow start time. The Workflow Manager lists built-in variables under the Built-in node in the Expression Editor.
    When you set the error severity level for log files to Tracing in the Integration Service, the workflow log displays the values of workflow variables. Use this logging level for troubleshooting only.
The following table lists the task-specific workflow variables available in the Workflow Manager:
Task-Specific
Variables
Description
Task Types
Datatype
Condition
Evaluation result of decision condition expression.
If the task fails, the Workflow Manager keeps the condition set to null.
Sample syntax:
$Dec_TaskStatus.Condition = <TRUE | FALSE | NULL | any integer>
Decision
Integer
EndTime
Date and time the associated task ended. Precision is to the second.
Sample syntax:
$s_item_summary.EndTime > TO_DATE('11/10/2004 08:13:25')
All tasks
Date/Time
ErrorCode
Last error code for the associated task. If there is no error, the Integration Service sets ErrorCode to 0 when the task completes.
Sample syntax:
$s_item_summary.ErrorCode = 24013
You might use this variable when a task consistently fails with this final error message.
All tasks
Integer
ErrorMsg
Last error message for the associated task.
If there is no error, the Integration Service sets ErrorMsg to an empty string when the task completes.
Sample syntax:
$s_item_summary.ErrorMsg = 'PETL_24013 Session run completed with failure
Variables of type Nstring can have a maximum length of 600 characters.
You might use this variable when a task consistently fails with this final error message.
All tasks
Nstring
FirstErrorCode
Error code for the first error message in the session.
If there is no error, the Integration Service sets FirstErrorCode to 0 when the session completes.
Sample syntax:
$s_item_summary.FirstErrorCode = 7086
Session
Integer
FirstErrorMsg
First error message in the session.
If there is no error, the Integration Service sets FirstErrorMsg to an empty string when the task completes.
Sample syntax:
$s_item_summary.FirstErrorMsg = 'TE_7086 Tscrubber: Debug info… Failed to evalWrapUp'
Variables of type Nstring can have a maximum length of 600 characters.
Session
Nstring
PrevTaskStatus
Status of the previous task in the workflow that the Integration Service ran. Statuses include:
  • ABORTED
  • FAILED
  • STOPPED
  • SUCCEEDED
Use these key words when writing expressions to evaluate the status of the previous task.
Sample syntax:
$Dec_TaskStatus.PrevTaskStatus = FAILED
All tasks
Integer
SrcFailedRows
Total number of rows the Integration Service failed to read from the source.
Sample syntax:
$s_dist_loc.SrcFailedRows = 0
Session
Integer
SrcSuccessRows
Total number of rows successfully read from the sources.
Sample syntax:
$s_dist_loc.SrcSuccessRows > 2500
Session
Integer
StartTime
Date and time the associated task started. Precision is to the second.
Sample syntax:
$s_item_summary.StartTime > TO_DATE('11/10/2004 08:13:25')
SESSSTARTTIME returns the current date and time value on the node that runs the session after the Integration Service initializes the session. If a mapping or mapplet uses SESSSTARTTIME, StartTime and SESSSTARTTIME will have different values for a session.
All tasks
Date/Time
Status
Status of the previous task in the workflow. Statuses include:
  • ABORTED
  • DISABLED
  • FAILED
  • NOTSTARTED
  • STARTED
  • STOPPED
  • SUCCEEDED
Use these key words when writing expressions to evaluate the status of the current task.
Sample syntax:
$s_dist_loc.Status = SUCCEEDED
All tasks
Integer
TgtFailedRows
Total number of rows the Integration Service failed to write to the target.
Sample syntax:
$s_dist_loc.TgtFailedRows = 0
Session
Integer
TgtSuccessRows
Total number of rows successfully written to the target
Sample syntax:
$s_dist_loc.TgtSuccessRows > 0
Session
Integer
TotalTransErrors
Total number of transformation errors.
Sample syntax:
$s_dist_loc.TotalTransErrors = 5
Session
Integer
All predefined workflow variables except Status have a default value of null. The Integration Service uses the default value of null when it encounters a predefined variable from a task that has not yet run in the workflow. Therefore, expressions and link conditions that depend upon tasks not yet run are valid. The default value of Status is NOTSTARTED.

0 COMMENTS

We’d like to hear from you!