Description
MainBlock is run when a component is started. It is not to be confused with InitInstance, which is run when an instance is started. Because of this, it is not possible to use any instance dependent data in this method.
PreCondition
This method is run when r-code for this component or a descendant component is loaded into memory. It is not to be confused with InitInstance, which is run when an instance is started.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program/mfgnotification.p)
<ANCESTOR-CODE>
assign
vcSmtpSender={&NOTIFICATION-DEFAULTSENDER}
vcIniPath = search({&NOTIFICATION-SERVERXML}).
assign vhFcComponent = ?.
<M-1 run MainBlock
() in XML>
assign vhXMLhandle = vhFcComponent.
<M-2 run ReadXML
(input vcIniPath (icXMLFile),
input 'mail':U (icStartTag),
output tNodesMfgNot (tNodes),
output viFcReturnSuper (oiReturnStatus)) in XML>
run gipr_DeleteProcedure in vhXMLhandle.
delete procedure vhXMLHandle.
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
For Each tNodesMfgNot:
If tNodesMfgNot.tcNodeName = 'SmtpSender':U
Then Assign vcSmtpSender = tNodesMfgNot.tcNodeValue.
End. /*For Each tNodesCall:*/