The flow or remote use and exit states technique provides a quick mechanism to communicate errors back to the client.
The interaction between client and server procedure is the link flow or a remote use statement.
On a flow, CA Gen captures the exit states that cause the client to flow to the server (the Flows On Exit State) and the exit state that causes the server to return to the client (the Returns on Exit State).
In the client/server environment, there is an implied return from a server to a client. Upon completion of the server, control returns to the client regardless of what exit state is set in the server. Defining the returns on exit state is not necessary.
When CA Gen returns on a link flow or a remote use from the server to the client, it can display the message associated with the exit state set in the server procedure when it completes.
To display a message, the exit state must have its message type defined as Informational, Warning, or Error. The message will be displayed automatically in a dialog box whether the returns on property is Execute First or Display First. After the user presses the OK push button on the message box, if the client/server procedure interaction is a link flow, one of the following two things happen:
If the client/server procedure interaction is a remote use then the next statement in the procedure logic (main or event logic) executes.
Given this behavior, the server can set an exit state with the appropriate message to be displayed. At the client procedure, the message displays automatically.
A link can have up to eight exit states that trigger a return to the client defined on the flow. However because there is an implied return from the server to the client, defining the exit state is optional. As a result, the server has an unlimited number of returning conditions.
Each exit state set by the server will represent a different condition in which the server may return to the client. Although specifying the upon return exit states on a link flow is optional, an application may choose to identify them so that the communication between the client and the server procedure is completely documented. This documentation of a flow will help in maintaining the application.
The following list explains advantages of this technique:
The following list explains disadvantages of this technique:
|
Copyright © 2013 CA.
All rights reserved.
|
|