Previous Topic: Add Logic to MAINTAIN GOLFERNext Topic: Initialize the Exit State Value


Diagram Structure

Server Procedure Step Action Diagrams typically follow a certain structure. The following is the structure:

  1. Initializing Exit States to a Known Value

    Since PADs only set exit state values if they fail, a quick way to determine success or failure when calling an action diagram is to set the special system attribute Exit State to a known value, call the action diagram, and then check to see if the value has been changed by the called action diagram. If you recall, the special system attribute Exit State can only contain one value per user per Business System at any one point in time. Once you have determined that it is failed, and then you can check for individual Exit State values to make appropriate Design processing decisions.

  2. Moving the contents of the Import Views to the Export Views

    The source of information (the import views) for a procedure step is typically a window (or a screen). The destination of information (the export views) from a procedure step is also typically a window (or a screen). To redisplay the information that was originally entered on the window, along with the new or updated information returned from the PADs, we have to move the import views of the procedure step to the export views of the procedure step. Then, when we call the PADs they will only export those views specific to it, overlaying those views in the export views of the procedure, while leaving all of the other export views unchanged. This updated view would then be redisplayed on the window. This only holds if we properly starve the views of our PADs (and CABs).

  3. Invoking the various PADs by way of a Case of Command structure

    When a client procedure calls a server procedure, there are often several things the server procedure can do for us. Usually, however, for each call to the server, we only want it to perform one of the many things it may be able to do. To tell the server procedure what we want it to do, we command it. Command is another special system attribute that can only hold one value at any point in time. Similar to the way in which we set the special system attribute Exit State, we typically pre-define a set of Command Values to choose from in setting its value. Then we would set the command to a pre-defined value, call the server procedure, the server procedure would then evaluate the command value, and then perform the appropriate action. The evaluation of the command value is usually performed in a CASE OF statement. A CASE OF statement allows you to evaluate one attribute for a series of values all at once, and then perform just the one set of actions based on the current value.