Terminator Jobs
Terminator job definitions provide conditional job groupings based on certain job statuses.
With the implementation of Terminator jobs, TA provides the mechanism to:
-
Control the termination of remaining jobs in a job group when a conditional branch of a job stream is executed or when a job completes abnormally.
-
Control or assert the completion status of a job group. These statuses identify jobs/job groups undergoing termination:
Terminate Waiting – A job group is in the process of terminating but is waiting on dependencies. This is because the group has a child that ignored the terminate request, and the group must satisfy its dependencies before allowing its children to run.
Terminate Ready – A job group is in the process of terminating but is waiting on resources that it requires. This is because the group has a child that ignored the terminate request, and the group must lock its resources before allowing its children to run.
Terminating – A job group remains in a Terminating status until all of its child jobs are terminated or reach a final status if they were running.
Terminated – A job which has been Terminated did not and will not run.
How it works
When a Terminator job’s dependencies are met:
-
the job is set to the status specified in its definition.
-
the terminator job sends a terminate request to its immediate parent.
For job groups and non-terminator jobs, when you select the Terminate parent on option:
-
Error – The job sends a terminate request to its immediate parent if an error occurred during the jobrun.
-
Abnormal completion – The job sends a terminate request to its immediate parent if the job completed abnormally.
-
Abort – The job sends a terminate request to its immediate parent if the job was aborted.
When a job group receives a terminate request from a child, a parent, or the user, then the group processes the terminate request in one of these ways:
-
Ignores the terminate request based on one of these conditions:
-
If the Ignore option is selected in the On Terminate Request section on the Options tab of the job group definition.
-
If the group is in a Done state.
-
-
Sends a terminate request to all of its immediate children. The children process the terminate request immediately unless they are configured to ignore terminate requests. The child Terminator jobs that have not run are immediately set to a Terminated status.
-
If any child ignores the terminate request and the group's dependencies are not met, the group changes to Terminate Waiting status until its dependencies are met.
-
If any child ignores the terminate request and the group's resources are not available, the group changes to Terminate Ready status until its resources can be acquired.
-
If the group is active, it changes to Terminating status. The group remains in a Terminating status until all of its immediate children reach a Done state. If the group has a child Terminator job whose status is not Terminated, the group’s status is updated with that child's status. If there are multiple non-Terminated child Terminator jobs, the one with the highest priority determines the group's status. Finally, if there are multiple non-Terminated child Terminator jobs with the highest priority, the job that ran most recently is used to update the group status.
-
-
Sends a terminate request to its immediate parent if the Terminate parent option is selected in the On Terminate Request section on the Options tab of the job group definition.
When a non-terminator job receives a terminate request:
The job ignores the terminate request based on one of these conditions:
-
If the Ignore option is selected in the On Terminate Request section on the Options tab of the job definition.
-
If the job is in a Done state.
-
If the job is in a Running state and the On Terminate Request option, Abort if active is not selected.
-
If the job is in a Waiting state, the job is immediately set to a Terminated status.
The job is aborted if the selected On Terminate Request option is Abort if active. An abort message is sent to the agent/adapter, which will then update the job with its final status.