project BLF > class BBaseDaemonQueue > method InitialValues
Description
Add code here to initialize the calculated fields of a 'new' record (= a record that must be created in the application database) in a class temp-table.
Parameters
| icTableName | input | character | Name of the database table of which a record is created in the class temp-table. |
| oiReturnStatus | output | integer | |
Internal usage
unused
program code (program/bbasedaemonqueue.p)
<ANCESTOR-CODE>
if oiReturnStatus < 0
then return.
if icTableName = "fcDaemonQueue":U
then do:
assign tfcDaemonQueue.DaemonQueueStatus = {&DAEMONQUEUESTATUS-WAITING}.
if (viParentDaemonId = 0 OR
viParentDaemonId = ? )And
vcParentDaemonName <> '':U And
vcParentDaemonName <> ?
then do :
<Q-2 run DaemonPrim (all) (Read) (NoCache)
(input vcParentDaemonName, (DaemonName)
input 0, (DaemonId)
output dataset tqDaemonPrim) in BBaseDaemon >
find first tqDaemonPrim no-error.
if available tqDaemonPrim
then assign viParentDaemonId = tqDaemonPrim.tiDaemonId.
end.
assign tfcDaemonQueue.DaemonId = viParentDaemonId.
empty temp-table tqDaemonPrim.
end.