Signal action scenario
Use this scenario to have a signal job that processes and stores information that is useful for you to make a decision in the job log.
Signal action scenario usage
From a logical perspective, the signal job and branch job are different in their last step (the performed action). While the branch job always cancels, pauses, or releases its child jobs, the signal job only records a recommendation for you to make a decision. Instead of blocking the process, the signal scenario selects the run branch and allows the job stream to continue. This scenario extends the approach already available with the HCL Workload Automation prompts; it represents the combination of prompts with the capabilities of the branch job.
- Signal job
- Branch job
For the signal job:
- Specify the parameter ACTION_SWITCH=SIGNAL and set the Recovery Option to CONTINUE. In the job
stream definition, set the flag Requires Confirmation.
The signal job performs the evaluation logic, meaning that it evaluates the condition against the parent's properties, but does not cancel or pause any of its child jobs.
The Requires Confirmation flag causes the signal job to stop processing the job stream. After the signal job completes, it remains in the PEND status. The signal job log shows the complete condition evaluation process, included the confirmation recommendation. This means that the signal job evaluates the condition and writes the recommendation (either Confirm SUCC or Confirm ABEND) in its job log.
- Look at the signal job log and decide whether to confirm the job with either a SUCC or ABEND
status.
The following branch job starts only after you confirm the signal job. The branch job evaluates the status you set for the signal job and determines the run branch and stop branch.
This last step represents the simple branching, which is described in Simple branch scenario.
Figure 1 shows the job stream definition for the signal scenario.
The log of the first branch job shows that the job is being HELD, because it is in PEND status. This status requires your confirmation, otherwise the job's successors do not run.
============ START of branch job SIGNAL_1 ==========
================= Job environment ==================
MASTER_PLATFORM=UNIX
STREAM_NAME=GBJ_SIGNAL
STREAM_CPU=SYDNEY
BRANCH_JOB_NAME=SIGNAL_1
PARENT=PATTERN_JOB
==========================================================
============= Input parameters =============
CONDITION_SWITCH=COMPLEX
ACTION_SWITCH=SIGNAL
CONDITION_COUNT=1
PATTERN[1]=completed successfully
IS_CASE_SENSITIVE[1]=YES
IS_REGULAR_EXPRESSION[1]=NO
NEGATE_CONDITION_RESULT[1]=NO
==========================================================
============= MAIN DECISION MAKING =============
COMPLEX condition evaluation
----------ATOMIC CONDITION 1------------
Searching for "completed successfully" in JOBLOG of PATTERN_JOB
Pattern FOUND, performing further tests.
No additional value defined for specified pattern. Condition evaluated as TRUE.
ATOMIC CONDITION RESULT [1]= TRUE
-------------------------------------
-------- COMPLEX CONDITION ----------
[ TRUE ]
CONDITION_RESULT=TRUE
TRUE: The result of complex condition is TRUE.
==========================================================
============= Statistics of branch job SIGNAL_1 =============
******Recommended confirmation for this job is SUCC.******
============ END of branch job SIGNAL_1 ==========
The log of the second branch job shows the processing of the following branch job instance.
============ START of branch job BRANCH_1 ==========
==========================================================
============= Job environment =============
MASTER_PLATFORM=UNIX
STREAM_NAME=GBJ_SIGNAL
STREAM_CPU=SYDNEY
BRANCH_JOB_NAME=BRANCH_1
PARENT=SIGNAL_1
==========================================================
============= Input parameters =============
CONDITION_SWITCH=PARENT_SUCCESS
ACTION_SWITCH=CANCEL
==========================================================
============= MAIN DECISION MAKING =============
Evaluation dependent on PARENT_SUCCESS
TRUE: Searched for SUCC parent. Status of PARENT JOB(SIGNAL_1) is SUCC.
==========================================================
============= Action on STOP Branch =============
Performing action CANCEL on job SYDNEY#0AAAAAAAAAAAAEI6.B_DO_THE_BAD_THING
%cj SYDNEY#0AAAAAAAAAAAAEI6.B_DO_THE_BAD_THING;schedid;noask
Command forwarded to batchman for SYDNEY#GBJ_SIGNAL[(0012 12/21/07),
(0AAAAAAAAAAAAEI6)].B_DO_THE_BAD_THING
==========================================================
============= Action on RUN Branch =============
Performing action RELEASE on job SYDNEY#0AAAAAAAAAAAAEI6.G_DO_THE_GOOD_THING
Releasing of job SYDNEY#0AAAAAAAAAAAAEI6.G_DO_THE_GOOD_THING is NOT NECESSARY,
because priority=10
==========================================================
============= Statistics of branch job BRANCH_1 =============
TRUE: Searched for SUCC parent. Status of PARENT JOB(SIGNAL_1) is SUCC.
For action CANCEL - RUN_BRANCH=G_DO_THE_GOOD_THING and
STOP_BRANCH=B_DO_THE_BAD_THING
BRANCH selected to STOP: B_DO_THE_BAD_THING
BRANCH selected to CONTINUE: G_DO_THE_GOOD_THING
CANCELED_JOBS: B_DO_THE_BAD_THING
PAUSED_JOB:
RELEASED_JOB:
============ END of branch job BRANCH_1 ==========
Required input parameters
Table 1 shows the parameters required for the signal job. The following branch job does not take any parameters.
Parameter name | Parameter value |
---|---|
ACTION_SWITCH | SIGNAL |
The parameter definition looks like the following example. The text is entered into the Comments field of the job stream definition.
SIGNAL_1-BEGIN
CONDITION_SWITCH=COMPLEX
PATTERN_1=completed successfully
ACTION_SWITCH=SIGNAL
SIGNAL_1-END
For a description about how to specify the parameters to the branch job, see Specifying the branch job parameters.
Placing the branch jobs into the job stream
Put the signal job after the job to be evaluated. Assign to the signal job a name consisting of the string SIGNAL and a numeric value (in this scenario, SIGNAL_1 is used).
The following branch job is the immediate successor of the signal job. Assign it a name with the appropriate suffix: if it is the first branch job within the job stream, the name might be BRANCH_1.
The child jobs of the branch job must be named according to the common guidelines:
- The good child's name must begin with the "G_" prefix.
- The bad child's name must begin with the "B_" prefix.