WFL Task State Expression

The task state expression in WFL returns a Boolean value indicating whether a process is in a specified state. For example, the following statement fragment takes a specified action if the process with task variable T1 has completed execution.

IF T1 IS COMPLETED THEN...

Some of the task states that can be queried correspond to single STATUS task attribute values. Other task states correspond to two or more STATUS task attribute values. Thus, at any given time, it is possible that more than one of the possible task state expressions will return a value of TRUE. The following are values that can be used in a WFL task state expression, and the conditions that cause them to evaluate to TRUE:

The system is delaying initiation of the process. The STATUS task attribute value is SCHEDULED.

  • SCHEDULED

  • ACTIVE

    The process is executing normally. The STATUS task attribute value is ACTIVE.

  • STOPPED

    The process is waiting on an event that might require operator action. The STATUS task attribute value is SUSPENDED.

  • INUSE

    The process is in use; that is, it has been initiated but has not yet terminated. The STATUS task attribute value is SCHEDULED, ACTIVE, or SUSPENDED.

  • COMPLETED

    The process terminated. The STATUS task attribute value is TERMINATED or BADINITIATE.

  • COMPLETEDOK

    The process completed execution normally, but if it was a compilation, it might not have compiled the program successfully. The STATUS task attribute value is TERMINATED and the HISTORYTYPE task attribute value is NORMALEOTV or SYNTAXERRORV.

  • COMPILEDOK

    The process completed execution normally. If the process was a compilation, it compiled the program successfully. The STATUS task attribute value is TERMINATED and the HISTORYTYPE task attribute value is NORMALEOTV.

  • ABORTED

    The process terminated abnormally, for example, because of a fault or because of operator entry of a DS (Discontinue) system command. The STATUS task attribute value is TERMINATED or BADINITIATE, and the HISTORYTYPE task attribute value is DSEDV.

The COMPLETEDOK, COMPILEDOK, and ABORTED values give you the ability to determine whether a process completed successfully. For further information on determining how and why a process terminated, refer to Determining Process History.