Parameters
Internal usage
BLF
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 tIsAliveSessionToken no-error.
if not available tIsAliveSessionToken
then do:
<M-2 run SetMessage
(input #T-3'The Global Session ID is not known in this call.':60(8155)T-3# (icMessage),
input '' (icArguments),
input '' (icFieldName),
input '' (icFieldValue),
input 'S':U (icType),
input 1 (iiSeverity),
input '' (icRowid),
input 'BLF-356':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
assign oireturnstatus = -1.
end.
else assign vcGlobalSessionId = tIsAliveSessionToken.tcMfgSessionId.
<M-4 run SetQadContextProperty
(input 'SessionId' (icPropertyName),
input vcGlobalSessionId (icPropertyValue),
output viFcReturnSuper (oiReturnStatus)) in PAuthentication>
if viFcReturnSuper <> 0
then do:
assign oiReturnStatus = viFcReturnSuper.
<M-7 run SetMessage
(input #T-8'The -$1- property could not be set in the internal service context.':100(8066)T-8# (icMessage),
input 'SessionId':U (icArguments),
input '' (icFieldName),
input '' (icFieldValue),
input 'S':U (icType),
input 1 (iiSeverity),
input '' (icRowid),
input 'BLF-357':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>
leave.
end.
empty temp-table ttIsAliveRequest.
empty temp-table ttIsaliveSessionToken.
for each tIsAliveRequest:
create ttIsAliveRequest.
assign ttIsAliveRequest.tt_updateSession = tIsAliveRequest.tlUpdateSession.
end.
for each tIsAliveSessionToken:
create ttIsaliveSessionToken.
assign ttIsaliveSessionToken.tt_session_id = tIsAliveSessionToken.tcMfgSessionId.
end.
assign vhIn = dataset dsASIsAliveRequest:handle
vhOut = dataset dsASGeneralResponse:handle
vhInOut = ?.
Create Dataset vhInOut in widget-pool "non-persistent".
vhInOut:name = "CallService".
<M-1 run CallService
(input '':U (icProgramName),
input 'isAlive':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 tResponseCode.
for each ttResponseCode :
create tResponseCode.
assign tResponseCode.tcResponseCode = ttResponseCode.tt_responseCode.
end.
delete object vhInOut.
If oiReturnStatus = -98
Then Assign oiReturnStatus = 0.