project BLF > class TDaemonUtility > method ProcessIsValid
Parameters
icDaemonName | input | character | |
icProcessHostname | input | character | |
iiProcessNr | input | integer | |
icDaemonAppserverURL | input | character | Appserver connection URL for the daemon. This parameter is ONLY filled in when the call to this method is done before the AppServer URL can be retrieved from the daemon query. Typical case is the validation of the daemon configuration.If this parameter is not supplied, then the appserver connection is taken from the internal record that contains the daemon configuration (fcDaemon). |
olValid | output | logical | |
ocMessage | output | character | |
oiReturnStatus | output | integer | |
Internal usage
BLF
QadFinancials
program code (program1/tdaemonutility.p)
assign oiReturnStatus = -98.
<M-5 run GetAppserverConnection
(input icDaemonName (icDaemonName),
input icDaemonAppserverUrl (icDaemonAppserverURL),
output vhAppserver (ohDaemonAppserver),
output vcMessage (ocMessage),
output viFcReturnSuper (oiReturnStatus)) in TDaemonUtility>
if viFcReturnSuper < 0
then do:
assign oiReturnStatus = viFcReturnSuper
ocMessage = vcMessage.
return.
end.
if valid-handle(vhAppserver) and vhAppserver:connected()
then do:
/* ================================================================= */
/* run daemon on appserver */
/* ================================================================= */
run program/tdaemonutility.p persistent set vhFcComponent on vhAppserver (input viSessionID).
run ProcessIsValidInternal in vhFcComponent
(input icProcessHostname,
input iiProcessNr,
output olValid,
output oiReturnStatus).
run gipr_DeleteProcedure in vhFcComponent.
delete procedure vhFcComponent.
vhAppserver:disconnect().
delete object vhAppServer.
end.
else do:
/* ================================================================= */
/* call method locally */
/* ================================================================= */
<M-4 run ProcessIsValidInternal
(input icProcessHostname (icProcessHostname),
input iiProcessNr (iiProcessNR),
output olValid (olValid),
output oiReturnStatus (oiReturnStatus)) in TDaemonUtility>
end.
assign ocMessage = vcMessage.
if oiReturnStatus = -98
then assign oiReturnStatus = 0.