Description
Send a stop request to the appropriate daemon, just by setting the daemons status on "Stopping".
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/bbasedaemonprocessor.p)
assign oiReturnStatus = -98.
/* ================================================================= */
/* Start the business components that contain all functions to */
/* update the DB. */
/* ================================================================= */
<M-1 run StartDaemonComponent (output vhBBaseDaemonInst (ohDaemon),
output vhBBaseDaemonQueueInst (ohDaemonQueue),
output viFcReturnSuper (oiReturnStatus)) in BBaseDaemonProcessor>
if viFcReturnSuper <> 0
then do :
assign oiReturnStatus = viFcReturnSuper.
<M-2 run SetMessageInDaemonLog
(input 'DaemonProcessor.SetDaemonStopping; ':U + #T-41'Error: Unable to start daemon component.':255(400084972)T-41# + string(vifcreturnSuper) (icMessage),
output viFcReturnSuper (oiReturnStatus)) in BBaseDaemonProcessor>
return.
end.
/* ================================================================= */
/* Tell the system that this daemon processor instance is stopped */
/* ================================================================= */
<M-3 run ControlDaemon
(input viFcDaemonId (iiDaemonId),
input {&DAEMONSTATUS-STOPPING} (icStatus),
output vcMessage (ocErrorMessage),
input viFcDaemonProcessId (iiProcessId),
input vcFcDaemonProcessHostName (icDaemonHostname),
output viFcReturnSuper (oiReturnStatus)) in BBaseDaemon>
if viFcReturnSuper <> 0
then do :
assign oiReturnStatus = viFcReturnSuper.
<M-4 run SetMessageInDaemonLog
(input 'DaemonProcessor.SetDaemonStopping; ':U + #T-65'Error when setting daemon status:':255(609257948)T-65# + vcMessage (icMessage),
output viFcReturnSuper (oiReturnStatus)) in BBaseDaemonProcessor>
return.
end.
assign oiReturnStatus = 0.