project BLF > class BRole > method XmlObjectDetail

Description

This method is called from within the generic code to create an XML representation of a component instance.


Parameters


oiReturnStatusoutputintegerReturn status of the method.


Internal usage


unused


program code (program/brole.p)

/*fill calculated field tRoleResource.tcResourceURI*/
/*to allow matching on tcResourceURI*/
/*this field is not filled on dataload*/
<Q-1 run ResourcePrim (all) (Read) (NoCache)
   (input ?, (ResourceURI)
    input ?, (ResourceId)
    output dataset tqResourcePrim) in BResource >

for each tRoleResource:
    find first tqResourcePrim where
               tqResourcePrim.tiResource_ID = tRoleResource.Resource_ID no-error.
    if available tqResourcePrim
    then assign tRoleResource.tcResourceURI = tqResourcePrim.tcResourceURI.
    else do:
        delete tRoleResource.
        
        if not vlWarned
        then do:
            vlWarned = yes.
            oiReturnStatus = 1.
            <M-28 run SetMessage
               (input  #T-65'A link was found to an unknown resource.':255(692257927)T-65# + ' ' + #T-12'Invalid data has been removed from the XML output.':255(644969561)T-12# (icMessage), 
                input  '' (icArguments), 
                input  '' (icFieldName), 
                input  '' (icFieldValue), 
                input  'W' (icType), 
                input  3 (iiSeverity), 
                input  '' (icRowid), 
                input  'BLF-480766':U (icFcMsgNumber), 
                input  '' (icFcExplanation), 
                input  '' (icFcIdentification), 
                input  '' (icFcContext), 
                output viFcReturnSuper (oiReturnStatus)) in BRole>
        end.
    end.
end.

<ANCESTOR-CODE>