WFL jobs can communicate with their tasks by using any of several methods. The following list reviews each method of interprocess communication:
-
A subroutine initiated with a PROCESS <subroutine> statement can access objects declared globally to the subroutine in the WFL job.
-
The RUN statement can include Boolean, integer, real, or string parameters. By default, these parameters are call-by-value parameters. However, you can specify that a parameter is call-by-reference by including the word REFERENCE after the parameter. A WFL job and an asynchronous task can communicate by interrogating and modifying the value of a call-by-reference parameter.
-
A WFL job cannot declare events or interrupts and cannot access event-valued task attributes directly. However, a WFL job can use the WAIT statement, which can wait on many different types of implicitly declared events. For example, the simple form of the WAIT statement waits on the job's exception event. A job can also use WAIT statements to wait for a task to terminate or for one of the task attributes to attain a specified value. A WFL job can also access the LOCKED task attribute. LOCKED is a Boolean task attribute that acts like an event.
-
Libraries cannot be written in WFL, nor can WFL jobs use libraries written in other languages.
-
WFL jobs cannot read from or write to files. A WFL job can create a single disk file and specify the contents of that file by using the DECK statement. However, the DECK statement, if used, must be the only statement in the job. Another useful feature is the ability of WFL to create a dummy file by simply declaring a file, opening it, and closing it. Such files can be used as flags to other processes. For example, a WFL job can perform a file-residence inquiry to determine whether a file with a certain title exists.
For details about any of these interprocess communication methods, refer to Understanding Interprocess Relationships.

