Processes the document that has already been loaded.
Syntax:
Returns
Returns 1 if the operation is successful; otherwise returns 0 if the operation fails.
Remarks
When a message is loaded using the Load method, it is automatically processed by default and so this method does not need to be called. However, one can load a message and prevent it from being processed by disabling the MailDocOpt_Auto option. If this is the case, the already loaded message can then be processed by calling the Process method.
Processing a message
When a message is being processed, it undertakes the following:
- If the message headers contain information that it has been secured, it will be automatically unsecured using all security information supplied.
- If encoded, the message is decoded using the encoding mechanism specified in the “Content-Transfer-Encoding” header.
- If the message contains an EDI document specified by the “Content-Type” header, the EDI document in the body will automatically be loaded to the ediDocument interface where it is processed. The “Content-Type” header containing the following type/subtype indicates that the message ontains an EDI document:
- Application/EDI-X12
- Application/EDIFACT
- Application/EDI-Consent
Note that before this method is called, all configurations required for processing the ediDocument (example load schema, cursor types, etc.) should have already been set in the ediDocument object. Example,
' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument
' Disable standard reference library.
Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False
Set oSchema = oEdiDoc.LoadSchema(App.Path & "\ASCX12_856.SEF", Schema_Standard_Exchange_Format)
' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument
' Load the mail document containing the EDI data.
oMailDocument.LoadEdi App.Path & "\Sample_856.X12"
- If the message has requested a Message Disposition Notification (MDN) and the option MailDocOpt_DisableMDN has not been disabled, an MDN is generated.
NOTE: The MailDocOpt_Auto option has no effect on the Process method.