project BLF > class PAuthentication > method KeepAlive

Description

Wrapper for IsAlive.


Parameters


icGlobalSessionIdinputcharacter
ilUpdateSessioninputlogicalupdate session timestamp if still active
olIsActiveoutputlogical
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method business.InitInstance
method BTimeOutDaemonProcessor.PerformWorkItem
method Progress.CleanupStateOnline
method Session.IsTimedOut

QadFinancials
method BBaseDaemonProcessor.UpdateSessionTimeStamps


program code (program1/pauthentication.p)

If oiReturnStatus = 0
Then Assign oiReturnStatus = -98.

Empty Temp-table tIsAliveSessionTokenCall.
Empty Temp-table tIsAliveRequestCall.
Empty Temp-table tResponseCodeCall.

Create tIsAliveSessionTokenCall.
Assign tIsAliveSessionTokenCall.tcMfgSessionId = icGlobalSessionId.
Create tIsAliveRequestCall.
Assign tIsAliveRequestCall.tlUpdateSession = ilUpdateSession.

Assign olIsActive = False.

<M-4 run IsAlive
   (input  dASIsAliveRequestCall (dASIsAliveRequest), 
    output tResponseCodeCall (tResponseCode), 
    output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
If viFcReturnSuper <> 0
Then Assign oiReturnStatus = viFcReturnSuper.
If viFcReturnSuper < 0
Then Return.  

/*catch tResponseCode and assign olIsActive {&SUCCESS-RESULT}*/    
Find First tResponseCodeCall No-error.
IF Available tResponseCodeCall And
   Trim(tResponseCodeCall.tcResponseCode) = '0':U /*{&SUCCESS-RESULT}*/
Then Assign olIsActive = True.

If oiReturnStatus = -98                 
Then Assign oiReturnStatus = 0.