[Progress Communities] [Progress OpenEdge ABL] Forum Post: calling asynchronous appserver procedure from class

  • Thread starter Thread starter kristjan.karp
  • Start date Start date
Status
Not open for further replies.
K

kristjan.karp

Guest
Hi, i try to create functionality for calling multiple requests from different appservers in parallel ( asynchronous ) and merge the results together later. It works ok with procedure run asyncAppserver/asProc2.p persistent set ttProcessExec.procHandle on server ttProcessExec.asHandle . run sleepingTime asynchronous set ttProcessExec.runHandle event-procedure "asyncRunResult" in this-procedure in ttProcessExec.procHandle ( ttProcessExec.procId, output returnMsg, output totTimeUsed ). NB: ttProcessExec is temp-table to hold all the different handles and info for the appsetrver calls but it wont work when i try to do same with OO ( inside class ), there 'this-procedure' cannot be used but unsing 'self' will generate an error 'invalid event-procedure context used with asynchronous request (8977)'. What should i do to get it work with OO also? the call: run asyncAppserver/asProc2.p persistent set ttProcessExec.procHandle on server ttProcessExec.asHandle. run sleepingTime asynchronous set ttProcessExec.runHandle event-procedure "asyncRunResult" in self in ttProcessExec.procHandle ( ttProcessExec.procId, output returnMsg, output totTimeUsed ). event procedure ( in same class): method public void asyncRunResult( asyncReturnMsg as character, timeUsed as integer ): totTimeUsed = totTimeUsed + timeUsed. run writeLog ( "async result: " + asyncReturnMsg + " - usedTime:" + string( timeUsed ) + " totTime: " + string( totTimeUsed ) ). end method. test procedure: using asyncAppserver.clCls. def var asObj as clCls no-undo. asObj = new clCls(). asObj:executeProcs(). delete object asObj no-error. br, kristjan karp

Continue reading...
 
Status
Not open for further replies.
Back
Top