A complete asynchronous request example
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
In the following example, the ABL client procedure, client.p, calls server.p (following) asynchronously on a server. The server.p procedure returns the customer number corresponding to a customer name provided by client.p.
The client.p procedure blocks and waits
for the PROCEDURE-COMPLETE event that triggers
execution of the GetCustNum event procedure. The GetCustNum procedure
displays the result and deletes the corresponding asynchronous request
handle (referenced by the SELF system handle).
In a more typical example, additional event handlers (triggers)
would be active for user-interface events, allowing the user of client.p to
perform other tasks with the procedure while completion of the request
is pending. In this case, the client application blocks immediately
after submitting the request to wait for the result and terminate
on the PROCEDURE-COMPLETE event.
client.p
|
server.p
|