Appendix D. Technical background

In order to use STAF GUI, it is not necessary that you understand how it works. This background information describes how it interacts with STAF demon process, called STAFProc, and the necessary steps it takes to complete the interaction.

STAF GUI uses STAF command line client executable, called STAF, to submit a request. It doesn't use STAF API. In fact, the executable uses STAF API to interact with STAFProc. Therefore, to use STAF GUI, this executable must be in the PATH environment variable.

In order to work with different versions of STAF, STAF GUI must be binary compatible with all the versions. For this reason, it uses STAF executable instead of directly using STAF API. Therefore, any future changes in STAF API will not affect the functionality of STAF GUI.

STAF GUI needs to know the commands and options of a service before you send a request. In this respect, it is like your sending a HELP request to know how to use a service. In other words, STAF GUI needs to be set up before it may be used. In the setup stage, you add the machines and their services that you want to send requests.

When you add or update services, STAF GUI sends a LIST request to the Service service to display available services.

When you select a service to add or update:

  1. It sends a HELP request to that service.

  2. It automatically finds all the commands and options from the service help.

  3. It sends a VERSION request if service provides such a command.

  4. It stores the service name, service help, and version locally.

When you start STAF GUI the next time, it uses the locally stored service help to find commands and options.

When you select a service to update:

  1. It sends a HELP request to that service.

  2. It compares the service help with the locally stored one. If they differ, then it copies the new commands and options and discards the old one.

  3. It sends a VERSION request if service provides such a command.

  4. It updates the service help and version if necessary.

Important

STAF GUI does not automatically update a service unless you ask for it. As a result, when you install or remove a new version of the service, the information on the machine may differ from STAF GUI.

In order to submit a request you need to compose one. First, you select a command in the Command pane. If the command has any options, then those options will display in the Option pane with the default values. Second, you specify values for options in the Option pane. If you specify all the necessary options, the Submit button becomes enabled. In addition, the composed request string displays in the Submit drop-down combination box. You submit this request by clicking the Submit button.

When you submit a request while history is in the enabled state, it stores the result locally in the specified format. Otherwise, closing STAF GUI will clear all results.