PROCEDURE-COMPLETE events
- Last Updated: March 30, 2020
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
The PROCEDURE-COMPLETE event is an event on the
asynchronous request handle. It indicates that the asynchronous request associated with
the handle has completed execution, and that the corresponding event procedure can be
executed. ABL executes an ABL callback procedure or the event procedure in the context
of a blocking I/O statement much like it executes the trigger for an ABL user-interface
event.
Note that you do not have to specify the PROCEDURE-COMPLETE event explicitly in your client code. ABL processes the
event like any other ABL event or callback procedure. You also do not have to define a
trigger for the event (for example, using an ON
statement) because you specify an event procedure in the RUN...ASYNCHRONOUS statement that defines the "trigger code" for the
event.
To process a PROCEDURE-COMPLETE event for a
particular asynchronous request handle, ABL:
- Decrements the
ASYNC-REQUEST-COUNTattribute on the following handles:- The server handle contained in
the
SERVERattribute of the asynchronous request handle - The procedure handle contained in the
PERSISTENT-PROCEDUREattribute of the asynchronous request handle, if thePERSISTENT-PROCEDUREattribute refers to a valid persistent procedure
- The server handle contained in
the
- Sets the
COMPLETEattribute for the asynchronous request handle toTRUE - Sets the
STOP,QUIT, orERRORattribute for the asynchronous request handle appropriately as indicated by the response message from the server, and stores any error information returned from the server for the request in theERROR-STATUSsystem handle - Sets the return value for the
RETURN-VALUEfunction, if a return value was returned by the PAS for OpenEdge instance - Attempts to execute the event procedure specified by the
EVENT-PROCEDUREand theEVENT-PROCEDURE-CONTEXTattributes for the asynchronous request handle, ifEVENT-PROCEDUREis not the empty string (""), and:- Sets each
INPUTparameter for the event procedure to theUnknown value (or, if the parameter is a?)TEMP-TABLEparameter, the temp-table remains unchanged, if the response message indicates that the remote request finished with aSTOP,ERROR, orQUITcondition - Sets the
INPUTparameter values for the event procedure to theOUTPUTandINPUT-OUTPUTparameter values returned by the remote procedure, if the response message indicates that the remote request completed successfully - Displays an error message, if a specified event procedure fails to execute for any reason
- Sets each