project BLF > class BEventDaemonQueue > method GetDocument

Description

Return the event data of a specific event waiting in the daemon queue to be published.


Parameters


iiDaemonQueueIdinputintegerThe id of the event.
omDocumentoutputmemptrMemptr to the event XML document
oiDestinationIdoutputintegerID of the destination
ocBusComponentNameoutputcharacterName of the component.
ocObjectIdoutputcharacterId of the object that is getting dumped or send.
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method BEventDaemonProcessor.PerformWorkItem


program code (program1/beventdaemonqueue.p)

<M-4 run DataLoad
   (input  '' (icRowids), 
    input  iiDaemonQueueId (icPkeys), 
    input  '' (icObjectIds), 
    input  '' (icFreeform), 
    input  no (ilKeepPrevious), 
    output viFcReturnSuper (oiReturnStatus)) in BEventDaemonQueue>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.

find first tEventDaemonQueue where tEventDaemonQueue.DaemonQueueId = iiDaemonQueueId no-error.
if not available tEventDaemonQueue
then do:
    assign oiReturnStatus = -1.
    return.
end.

find first tfcDaemonQueue no-error.
if not available tfcDaemonQueue
then do:
    assign oiReturnStatus = -1.
    return.
end.

copy-lob from tEventDaemonQueue.EventDaemonQueueLOB to omDocument no-convert.  /* do not convert to cpinternal */

Assign 
    oiDestinationId    = tEventDaemonQueue.EventDestination_ID
    ocBusComponentName = tEventDaemonQueue.tcBusComponentCode
    ocObjectId         = tfcDaemonQueue.DaemonQueueRef.