Executing an asynchronous request
- Last Updated: October 14, 2020
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
You execute an asynchronous request using the
RUN statement with the ASYNCHRONOUS option (the RUN...ASYNCHRONOUS statement). With this option, you can specify a
variable to return an asynchronous request handle used to uniquely identify and maintain
the status of the asynchronous request. You can also specify an internal procedure or
method to use as the event procedure or method, to handle the response from the
asynchronous request. For more information on the RUN...ASYNCHRONOUS statement, see the RUN
statement entry in ABL Reference.
When specifying the RUN...ASYNCHRONOUS statement, you can also include INPUT, OUTPUT, and INPUT-OUTPUT parameters similar to the parameters on a
synchronous RUN statement. As with the synchronous
RUN statement, the input parameters represent
values passed to the remote procedure. However, unlike the synchronous RUN statement, the output parameters do not return results
from the remote procedure directly on the RUN...ASYNCHRONOUS statement. The values for these output parameters are
not available until the asynchronous request completes and the client handles the
associated PROCEDURE-COMPLETE event. On detecting this
event, the client executes the specified event procedure or method, which returns the
values as input parameters to the event procedure or method. Thus, the output parameters
on the RUN...ASYNCHRONOUS statement serve only as
placeholders to map the signature of the remote procedure on the PAS for OpenEdge
instance. For more information, see Handling the response from an asynchronous request.