Description
Runs a single business function over all entities in a single entity group. Each call will use the same parameter set.
Parameters
ocUnmanagedData | output | character | Parameter values for the business function. The business function itself defines the implementation of this parameter. |
oiCurrentCompanyReturnStatus | output | integer | Return status of the execution of the activity in the Entity, user is logged in. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bmulticyprocessor.p)
/* ================================================================= */
/* Restore session details */
/* ================================================================= */
if valid-handle(vhSessionInst)
then do:
<I-32 {bFcCloseAndStopInstance
&CLASS = "Session"}>
end. /* if valid-handle(vhSessionInst) */
else if viSessionID <> 0 and
viSessionID <> ?
then do:
<I-40 {bFcStopInstance
&CLASS = "Session"}>
end.
assign viSessionID = viSessionSavedID
viSessionOC = viSessionSavedOC
vhSessionInst = vhSessionSavedInst.
/* ================================================================= */
/* Provide the error handling for the ProcessRequest method itself. */
/* ================================================================= */
for each tProcessErrors:
create tFcMessages.
buffer-copy tProcessErrors to tFcMessages.
end.
empty temp-table tProcessErrors.
/* ================================================================= */
/* If some companies were skipped, make an warning for this */
/* ================================================================= */
for each tAsyncProcessCompanies where
tAsyncProcessCompanies.tlIsProcessed <> true:
assign vcMessage = #T-31'Processing in the entity &1 was skipped by user request.':255(547904535)T-31#
vcMessage = substitute(vcMessage, tAsyncProcessCompanies.tcCompanyCode).
<M-22 run SetMessage
(input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'W':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'qadfin-67663':U (icFcMsgNumber),
input '':U (icFcExplanation),
input '':U (icFcIdentification),
input '':U (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BMultiCyProcessor>
if viAsyncReturnStatus = 0 then assign viAsyncReturnStatus = 1.
end.
/* ================================================================= */
/* Return final values together with all errors */
/* ================================================================= */
assign ocUnmanagedData = vcAsyncOutputUnmanagedData
oiCurrentCompanyReturnStatus = viAsyncCurrentCompReturnStatus
oiReturnStatus = viAsyncReturnStatus.