project BLF > class PMfgPro > method CallStandAloneService

Description

This method should be used instead of the normal CallService method in case a service needs to be called that is implemented in a non-persistent stand-alone program on the qra server side. Extra parameters icExternalProcedureDispatcher and icExternalProcedureService can be used to call the right procedure..


Parameters


icExternalProcedureDispatcherinputcharacterName of the dispatcher program that handles the request. If left blank, the default "com/qad/qra/si/ExternalProcedureDispatcher.p" is used.
icExternalProcedureServiceinputcharacterName of the external program that has the service implemented as a stand-alone non-persistent program.
izInputinputdataset-handleInput dataset
bzInputOutputinput-outputdataset-handleInput-Output dataset
bzOutputinput-outputdataset-handleOutput dataset
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method PDocumentLink.RegisterAttachment
method PWorkInbox.CreateMessage
method PWorkInbox.DeleteMessage


program code (program1/pmfgpro.p)

assign oiReturnStatus   = -98
       vcDispatcherName = icExternalProcedureDispatcher.

if icExternalProcedureService = "" or
   icExternalProcedureService = ?
then do:
    <M-1 run SetMessage
       (input  'The stand-alone procedure for the service was not specified.':U (icMessage), 
        input  '' (icArguments), 
        input  '' (icFieldName), 
        input  '' (icFieldValue), 
        input  'S':U (icType), 
        input  1 (iiSeverity), 
        input  '' (icRowid), 
        input  'BLF-377':U (icFcMsgNumber), 
        input  'This is an internal error.':U (icFcExplanation), 
        input  '' (icFcIdentification), 
        input  '' (icFcContext), 
        output viFcReturnSuper (oiReturnStatus)) in PMfgPro>
        
    assign oiReturnStatus = -1.
    return.
end.

<M-5 run CallService
   (input  icExternalProcedureService (icProgramName), 
    input  'Fake':U (icMethodName), 
    input  izInput by-reference (izInput), 
    input-output bzInputOutput by-reference (bzInputOutput), 
    input-output bzOutput by-reference (bzOutput), 
    input  ? (icAsyncHandler), 
    output viFcReturnSuper (oiReturnStatus)) in PMfgPro>

if viFcReturnSuper <> 0
then do:
    assign oiReturnStatus = viFcReturnSuper.
    return.
end.

if oiReturnStatus = -98
then assign oiReturnStatus = 0.