project BLF > class BSystem > method AdditionalUpdates

Description

This method is part of the SetPublicTables flow.
When executed, data in the input class tables (prefix t_s) is validated and found correct, and copied into the class tables (prefix t_o).
This method can be extended to do updates that do not require a validation or that involve running business methods of other business classes. These classes should be started with ADD-TO-TRANSACTION = 'true'. Also make sure to add these classes in method StopExternalInstances.


Parameters


oiReturnStatusoutputinteger


Internal usage


BLF
method BSystem.ActivateSOD

QadFinancials
method BSystem.ApiSetSystemPropertiesExtInvCert


program code (program/bsystem.p)

<ANCESTOR-CODE>

for each tSyst on error undo, throw:
         
    if tSyst.tc_Status = "C":U 
    then do:
    
        /* Skip out if the Domain hasn't been changed... */
        find t_iSyst where 
             t_iSyst.tc_Rowid = tSyst.tc_Rowid.

        if tSyst.Domain_ID <> t_iSyst.Domain_ID 
        then do:
            <I-8 {bFcAddToTransaction
                 &CLASS           = "BDomain"}>
            <M-4 run SetDomainTypeAsSystem
               (input  tSyst.Domain_ID (iiDomainID), 
                output viLocalReturnStatus (oiReturnStatus)) in BDomain>
            <I-6 {bFcCloseInstance
                 &CLASS           = "BDomain"}>
            if viLocalReturnStatus <> 0 
            then assign oiReturnStatus = viLocalReturnStatus.
            if viLocalReturnStatus < 0
            then do:
                <M-7 run StopExternalInstances  (output viFcReturnSuper (oiReturnStatus)) in BSystem>
                return.
            end.
        end.

        /* ================================================================= */
        /* Set a flag when SOD is activated.                                 */
        /* Do not set this flag on a new system (create syst).               */
        /* ================================================================= */
        vlSODActivated   = (tSyst.SystSODActive = yes and t_iSyst.SystSODActive = no and tSyst.SystSODBlockViolations = no).
        vlSODDeactivated = (tSyst.SystSODActive = no  and t_iSyst.SystSODActive = yes).
        
        /* Set the SOD active flag to status WIP */
        if vlSODActivated then tSyst.SystSODActive = ?.
    end.       
    
end. /* for each tSyst */