Table of Contents

Search

  1. Preface
  2. Workflow Manager
  3. Workflows and Worklets
  4. Sessions
  5. Session Configuration Object
  6. Tasks
  7. Sources
  8. Targets
  9. Connection Objects
  10. Validation
  11. Scheduling and Running Workflows
  12. Sending Email
  13. Workflow Monitor
  14. Workflow Monitor Details
  15. Session and Workflow Logs
  16. Appendix A: Session Properties Reference
  17. Appendix B: Workflow Properties Reference

Workflow Basics Guide

Workflow Basics Guide

Using Pre- and Post-Session Shell Commands

Using Pre- and Post-Session Shell Commands

The Integration Service can perform shell commands at the beginning of the session or at the end of the session. Shell commands are operating system commands. Use pre- or post-session shell commands, for example, to delete a reject file or session log, or to archive target files before the session begins.
The Workflow Manager provides the following types of shell commands for each Session task:
  • Pre-session command.
    The Integration Service performs pre-session shell commands at the beginning of a session. You can configure a session to stop or continue if a pre-session shell command fails.
  • Post-session success command.
    The Integration Service performs post-session success commands only if the session completed successfully.
  • Post-session failure command.
    The Integration Service performs post-session failure commands only if the session failed to complete.
Use the following guidelines to call a shell command:
  • Use any valid UNIX command or shell script for UNIX nodes, or any valid DOS or batch file for Windows nodes.
  • Configure the session to run the pre- or post-session shell commands.
The Workflow Manager provides a task called the Command task that lets you configure shell commands anywhere in the workflow. You can choose a reusable Command task for the pre- or post-session shell command. Or, you can create non-reusable shell commands for the pre- or post-session shell commands.
If you create a non-reusable pre- or post-session shell command, you can make it into a reusable Command task.
The Workflow Manager lets you choose from the following options when you configure shell commands:
  • Create non-reusable shell commands.
    Create a non-reusable set of shell commands for the session. Other sessions in the folder cannot use this set of shell commands.
  • Use an existing reusable Command task.
    Select an existing Command task to run as the pre- or post-session shell command.
Configure pre- and post-session shell commands in the Components tab of the session properties.

0 COMMENTS

We’d like to hear from you!