Job Continuation After a Task Fails

A WFL job can be written to take special action in the event that a task terminates abnormally. The following features are available:

  • The ON TASKFAULT statement can be used to direct the job to execute a particular statement or set of statements whenever a task of the job fails. Refer to ON Statement for details.

  • The STATUS, HISTORYCAUSE, and HISTORYTYPE attributes of a task can be interrogated after a task terminates. An IF statement or CASE statement can be used to cause different actions to be taken according to the values of these attributes. Refer to Interrogating Task Status for details on STATUS. HISTORYCAUSE and HISTORYTYPE are both mnemonic task attributes. Refer to Interrogating Complex Task Attributes. Task attributes are also discussed in the Task Attributes Programming Reference Manual.

  • The task state expression can be used to determine whether a task terminated normally. An IF statement or CASE statement can be used to cause different actions to be taken according to the value of this expression. Refer to Boolean Expressions for details.

The abnormal termination of a task does not affect the job; the job continues to execute and proceeds to the statement following the one that initiated the task.