Try OpenEdge Now
skip to main content
Application Migration and Development Guide
Application Development with PAS for OpenEdge : Programming ABL Client Applications : Managing asynchronous requests : Asynchronous requests and persistent procedures
 
Asynchronous requests and persistent procedures
Client applications can asynchronously instantiate a persistent procedure and then execute an internal procedure on the persistent procedure before the remote persistent procedure has actually been created on the server. When the RUN...ASYNCHRONOUS statement is executed for the purposes of creating the remote persistent procedure, a proxy procedure handle is returned to the client application.
The client application can then immediately use the proxy procedure handle to run an internal procedure in the remote persistent procedure. If the asynchronous request to instantiate the remote persistent procedure has completed, you can run the internal procedure synchronously or asynchronously. If it has not completed, you can only run the internal procedure asynchronously.
Because both the request to instantiate the persistent procedure and the asynchronous request to execute the internal procedure are executing on the same connection, ABL guarantees that the request to instantiate the persistent procedure executes before the request to run the internal procedure. If the request to instantiate the persistent procedure ultimately fails, the request to run the internal procedure will ultimately fail as well, because the proxy procedure handle used to run the internal procedure is invalid. When the internal procedure request fails, The client session sets the ERROR attribute to TRUE on both the asynchronous request handle and the ERROR-STATUS system handle, indicating that an invalid proxy procedure handle was used to execute the internal procedure.