Sequence of automatic EDI processing of outbound data

<< Click to Display Table of Contents >>

Navigation:  Automation > EDI > Import outbound EDI data >

Sequence of automatic EDI processing of outbound data

1.!MC5 regularly runs through all import rules and tests for every active rule if files matching the file mask are found in the search directory specified in the rule. Each matching file is then processed further.

Handling of files that cannot be accessed

For each file found, !MC5 first checks whether the file can be accessed or whether it is still being used by another program, for example. If this is the case, this file is skipped and the file is checked again during the next search. If the same file could not be accessed three times in a row, a corresponding warning is generated. These warnings as well as a list of the files are displayed under"Settings / Automation" for the respective rules.

2.If the option Convert data from EBCDIC to ASCII is enabled, the data is converted from EBCDIC to ASCII.

3.If a filter is selected, the data is processed by the filter. A filter can accept, block or change the data.

a.If the filter blocks the data (filterRes = fiAbort), the processing is cancelled. Processing continues with the next rule.

b.If the filter accepts the data (filterRes = fiUseInput), the original data is processed.

c.If the filter changes the data (filterRes = fiUseOutput), the changed data is processed.

d.If an error occurs during execution of the filter (either is a fatal error occurs or if filterRes is set to fiError), processing gets cancelled, the file is moved to the subdirectory EDIImport_Error (see 8.). No further rules are applied.

Files rejected by all filters

If all rules applied to a file use a filter, and the file is rejected by all these filters (filterRes = fiAbort), then no further attempt is made to import this file. Only when either the rules or the filters have been edited, !MC5 has been restarted, or the list of rejected files has been manually reset, will !MC5 try to import the file again. Corresponding warnings as well as a list of the affected files are displayed under"Settings / Automation" for the respective rules.

4.If Convert data is enabled, the selected conversion is applied to the data, if not the data get imported directly if it can be identified as the message type the rule applies to.

5.The message gets added to the message archive and EDI outbox.

6.The message gets printed, if the option print messages (or equivalent) is enabled for the rules message type (Settings / EDI / Message types / ...). The default printing option can be overridden in the import rule.

7.The message gets prepared for sending, if the option send imported messages is enabled for the respective message type (Settings / EDI / Message types / ...) or if it is set as override in the import rules settings.

a.The data is saved into the outgoing folder of the selected partner. The file name is constructed using the Local send name pattern. This can be a fixed name or it can contain various placeholders (see Reference / Settings / Automation / Import outbound EDI data). If a file with the constructed name already exists in the outgoing folder, or in its subfolder Prepare, a counter is added to the file name.

b.A sending job for the file gets created and passed to the communication module used for the partner.

8.If the import was successful, the subfolder EDIImport_Success is created inside the search folder of the import rule and the imported file is moved to this folder. If an error occurred during import, the file is moved to the subfolder EDIImport_Error. If a file using the same name already exists in the target folder, a counter is added to the moved files name.

9.EDI processing is finished.

Only one import rule is applied to each file

After one import rule is applied to a file and the file is moved to EDIImport_Success or EDIImport_Error no further import rule gets applied. So in contrast to export rules, where multiple rules can be used for one received message, when importing only the first matching import rule is used.