calling PAS async (Feature or bug?)

Posted by jasonmitie on 26-Jul-2018 05:00

So im calling PAS async using the appserver transport.

(Tested on 11.7.1, 11.7.3)

CREATE SERVER hPAS.
ASSIGN blnRet = hPAS:CONNECT("-URL " + SystemParameter.PASConnectionURL).

RUN somecode.p ON hPAS ASYNCHRONOUS SET hasync ().

QUIT.

The above code never finishes the execution of somecode.p. As soon as the "QUIT" statement is hit, the second session dies on PAS. If i place a Pause between the run and the quit, i can make the execution get further or complete.

So the async run seems to rely on the calling process staying active? Is this correct behavior? Im almost certain on 11.6 flavors this did not happen.

All Replies

Posted by Brian K. Maher on 26-Jul-2018 05:52

Hi Jason,
 
This is expected behavior.  PAS is not a ‘fire and forget’ platform.  If you kick off an async request to PAS then you disconnect or quit a STOP condition will be sent to the MS-agent running your request.
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

Posted by Brian K. Maher on 26-Jul-2018 05:54

You may want to try wrapping the code in the somecode.p code within a DO ON STOP UNDO, RETRY block and see if that intercepts the STOP condition for you.  You will have to deal with the undo behavior yourself using IF RETRY THEN ...
 
Brian Maher
Principal Engineer, Technical Support
Progress
Progress
14 Oak Park | Bedford, MA 01730 | USA
phone
+1 781 280 3075
 
 
Twitter
Facebook
LinkedIn
Google+
 
 

This thread is closed