Resolved Server <name> Has Outstanding Asynchronous Requests. Cannot Run. (9004)

RealHeavyDude

Well-Known Member
There is a good exaplanation in the KB entry you mention.

Since you don't reveal anything on what you actually do - all I can do is speculate.

Therefore I would guess that you need to redesign your logic to submit the synchronous call on the AppServer only when the asynchronous call has finished. You cannot have a asynchsonous and a synchronous call on the AppServer at the same time.

Heavy Regards, RealHeavyDude.
 

Kalan

Member
Thanks RHD,

For example, I've an valid appserver handle and not sure whether its already handling any asynchronous calls before I submit any synchronous call I would like to check if any asynchronous calls are in process/uncompleted/queue. I can see some other external progress procedure runs asynchronous RPC with respective EVENT-PROCEDURE. I am developing the new program with the statement to submit synchronous RPC using same app server session handle. In this scenario, I've 3 options. 1. Use new appserver handle to submit synchronous RPC 2. Instead of running synchronous mode, submit the call in asynchronous mode. 3. Before submitting synchronous call check if any asynchronous call already in process.

For option 3, I understand OpenEdge provides a mechanism to check the status of asynchronous requests for a session-managed connection or session-free operating mode. Just to make sure if no asynchronous calls are in queue/process, can we check this criteria by
Code:
IF VALID-HANDLE(AppserverHandle) AND AppserverHandle:COMPLETE THEN /* To make sure no uncompleted aynchronous calls exists. */
  RUN <ExternalProc>.p ON AppserverHandle.

DO WHILE NOT AppserverHandle:COMPLETE:
  PROCESS EVENTS.
  IF AppserverHandle:COMPLETE THEN
    RUN <ExternalProc>.p ON AppserverHandle.
END.


Thanks.
 
Last edited by a moderator:

RealHeavyDude

Well-Known Member
Please wrap code in CODE tags - it makes it much better readable.

Nevertheless, I did not have a use case yet for which I did need the complete attribute on the AppServer handle. But, as the documentation states it pretty clear, by checking this attribute you can check whether there are outstanding requests for which the procedure-complete event has not been processed yet.

Therfore, as far as I can see, your code should work.

Heavy Regards, RealHeavyDude.
 
Top