project BLF > class PAuthentication > method GetTimeOutRemote

Description

Method that call the getTimeoutRemote procedure in mfaspl.p (MfgPro).


Parameters


tTimeoutSessionTokeninputtemp-table
tResponseTimeoutoutputtemp-table
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method PAuthentication.GetTimeOutWrapper


program code (program1/pauthentication.p)

If oiReturnStatus = 0
Then Assign oiReturnStatus = -98.

/* ==================================================================================================== */
/*  Make sure the right global session is used when activating the MfgPro session.                      */
/* ==================================================================================================== */
find first tTimeoutSessionToken no-error.
if not available tTimeoutSessionToken
then do:
    <M-1 run SetMessage
          (input  #T-5'The Global Session ID is not known in this call.':60(8155)T-5# (icMessage), 
           input  '' (icArguments), 
           input  '' (icFieldName), 
           input  '' (icFieldValue), 
           input  'S':U (icType), 
           input  1 (iiSeverity), 
           input  '' (icRowid), 
           input  'BLF-349':U (icFcMsgNumber), 
           input  '' (icFcExplanation), 
           input  '' (icFcIdentification), 
           input  '' (icFcContext), 
           output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
    assign oireturnstatus = -1.
end.
else assign vcGlobalSessionId = tTimeoutSessionToken.tcMfgSessionId.
<M-2 run SetQadContextProperty
   (input  'SessionId' (icPropertyName), 
    input  vcGlobalSessionId (icPropertyValue), 
    output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
if viFcReturnSuper <> 0
then do:
    assign oiReturnStatus = viFcReturnSuper.
    <M-3 run SetMessage
       (input  #T-6'The -$1- property could not be set in the internal service context.':100(8066)T-6# (icMessage), 
        input  'SessionId':U (icArguments), 
        input  '' (icFieldName), 
        input  '' (icFieldValue), 
        input  'S':U (icType), 
        input  1 (iiSeverity), 
        input  '' (icRowid), 
        input  'BLF-350':U (icFcMsgNumber), 
        input  'The internal context property could not be set.  This is an internal error.':U (icFcExplanation), 
        input  '' (icFcIdentification), 
        input  '' (icFcContext), 
        output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
    return.
end.

empty temp-table ttTimeoutSessionToken.

for each tTimeoutSessionToken:
    create ttTimeoutSessionToken.
    assign ttTimeoutSessionToken.tt_session_id = tTimeoutSessionToken.tcMfgSessionId.
end.

assign vhIn = dataset dsASTimeoutRequest:handle
       vhOut = dataset dsASTimeOutReponose:handle
       vhInOut = ?.
       
Create Dataset vhInOut in widget-pool "non-persistent".
vhInOut:name = "CallService".

<M-4 run CallService
   (input  '':U (icProgramName), 
    input  'getTimeoutRemote':U (icMethodName), 
    input  vhIn By-reference (izInput), 
    input-output vhInOut By-reference (bzInputOutput), 
    input-output vhOut By-reference (bzOutput), 
    input  '' (icAsyncHandler), 
    output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
If viFcReturnSuper <> 0
Then Assign oiReturnStatus = viFcReturnSuper.
If viFcReturnSuper < 0
then do:
    delete object vhInOut.
    return.
end.

empty temp-table tResponseTimeout.

for each  ttResponseTimeout :
    create tResponseTimeout.
    assign tResponseTimeout.tiTimeOut = ttResponseTimeout.tt_timeout.
end.

delete object vhInOut.

If oiReturnStatus = -98
Then Assign oiReturnStatus = 0.