HCL Workload Automation, Version 9.4

Defining the branch job and signal job in the database

To define the branch and signal jobs in the HCL Workload Automation database you can use either the Dynamic Workload Console or composer.

Defining two jobs pointing to one shell script

To run any branch job scenario, you must define a branch job. To run a signal scenario, you must define also a signal job. Both jobs point to the same shell script file with the difference that:

  • For the branch job, you set the Recovery Option to STOP.
  • For the signal job, you set the Recovery Option to CONTINUE.

You have two different jobs pointing to the same shell script file to protect against incorrect placement of the branch job or signal job into the job stream. The branch job checks if it is correctly placed into the job stream; if not, it ABENDs. To prevent the successors from running, the branch job has the Recovery Option set to STOP.

The signal job performs the same check; if it is misplaced within the job stream the job prints an error message and exits with a nonzero return code. Even if the Recovery Option is set to Continue, the job does not release its successors from the dependency because it has the flag Requires Confirmation set within the job stream definition. The signal job, therefore, remains in the PEND status waiting for you to check its job log.

For more detailed information, see Signal action scenario.

Defining the branch job using the Dynamic Workload Console

To define a branch job in the HCL Workload Automation database using the Dynamic Workload Console, perform the following steps:

  1. Open the Workload Designer.
  2. Click New -> Job Definition -> Native and, according to your operating system, either UNIX or Windows.
  3. In the General pane, specify the following fields:
    • Name: BRANCH
    • Workstation: your master domain manager
    • Login: name of the user that submits and runs the job on the master domain manager
  4. In the Task pane:
    • Select the Script radio button.
    • According to your operating system:
      UNIX
      In the Task field, specify the complete path to the branch.sh shell script. Use forward slashes (/).
      Windows
      In the Task field, specify two paths:
      • The first path points to Cygwin: provide the complete path to the Cygwin bash executable. Use standard Windows notation, that is, backslashes (\) as directory separators.
      • The second path points to the shell script: provide the complete path to the branch.sh shell script. Use forward slashes (/). If the path contains spaces, insert it within double quotation marks.
      For example, the value for the Task field might be:
      c:\cygwin\bin\bash\ "TWA_home\TWS\bin\branch.sh"
  5. On the Recovery Options pane, set Action to Stop.
Note: You can use the HCL Workload Automation parameters as you would in any other job definition.

Defining the signal job using the Dynamic Workload Console

To define a signal job in the HCL Workload Automation database using the Dynamic Workload Console , perform the following steps:

  1. Open the Workload Designer.
  2. Click New -> Job Definition -> Native and, according to your operating system, either UNIX or Windows.
  3. In the General pane, specify the following fields:
    • Name: SIGNAL
    • Workstation: your master domain manager
    • Login: name of the user that submits and runs the job on the master domain manager
  4. In the Task pane:
    • Select the Script radio button.
    • According to your operating system:
      UNIX
      In the Task field, specify the complete path to the branch.sh shell script. Use forward slashes (/).
      Windows
      In the Task field, specify two paths:
      • The first path points to Cygwin: provide the complete path to the Cygwin bash executable. Use standard Windows notation, that is, backslashes (\) as directory separators.
      • The second path points to the shell script: provide the complete path to the branch.sh shell script. Use forward slashes (/). If the path contains spaces, insert it within double quotation marks.
      For example, the value for the Task field might be:
      c:\cygwin\bin\bash\ "TWA_home\TWS\bin\branch.sh"
  5. On the Recovery Options pane, set Action to Continue.

Defining the branch job and signal job using composer

To define a branch job and signal job in the HCL Workload Automation database from the composer, perform the following steps:
  1. Log on to the master domain manager as the user who has the permissions to ADD jobs.
  2. According to your operating system, create a new job definition similar to the following examples:
    UNIX
    $JOBS
    SYDNEY#BRANCH
    SCRIPTNAME "TWA_home/TWS/bin/branch.sh"
    STREAMLOGON tws
    TASKTYPE UNIX
    RECOVERY STOP
    
    SYDNEY#SIGNAL
    SCRIPTNAME "TWA_home/TWS/bin/branch.sh"
    STREAMLOGON tws
    TASKTYPE UNIX
    RECOVERY CONTINUE
    Windows
    $JOBS
    HELSINKI#BRANCH
    SCRIPTNAME "c:\cygwin\bin\bash\ "TWA_home\TWS\
    																				bin\branch.sh""
    STREAMLOGON tws
    TASKTYPE WINDOWS
    RECOVERY STOP
    
    $JOBS
    HELSINKI#BRANCH
    SCRIPTNAME "c:\cygwin\bin\bash\ "TWA_home\TWS\
    																				bin\branch.sh""
    STREAMLOGON tws
    TASKTYPE WINDOWS
    RECOVERY CONTINUE