ediSchemas

The ediSchemas object controls how schemas are selected when processing a document as well as providing access to the schema objects themselves. Schema objects are of data type FREDI.ediSchema and represent the implementation guidelines that are actually being used to translate a semantic group. An EDI document has levels of nested semantic groups (Interchange, Group, Transaction Set, etc.); and each semantic group can have a version, release and industry information of the standard that will indicate their syntax. When processing the document, the guideline that best translates or generates the document is loaded from an external implementation guideline (e.g. Standard Exchange Format (SEF) files), loaded either by the client or from the internal Standard Reference Library. The guidelines are loaded when version information are encountered in the document, or as soon as data segments are retrieved from the document.

To control the behavior for selecting the implementation guidelines, the following options are provided which can be enabled/disabled with the SetOption property:

  1. OptSchemas_SelectForward. When a document contains a version with an industry that is not supported by any of the loaded external guidelines, then the next standard version  of the guideline will be selected from the loaded external guidelines or from the standard reference library. If no industry information exists, it will use the same version if available, otherwise it will continue to search for the next version of the implementation. This option works only if OptSchemas_VersionRestrict is enabled. Also, the standard reference library is only used in the search if OptSchemas_StandardReference is not disabled. Example, if all these options were enabled and an EDI file with version 004010 and industry 0371 is encountered, it will attempt to select the next implementation containing version 004020, but if 004020 does not exist then it will use version 004010. However, if there is no industry information then the implementation containing version 004010 will be used.
  2. OptSchemas_StandardReference. This option enables the use of the internal standard reference library. The standard reference library is used only if none of the loaded external guidelines matches the version/industry requested.
  3. OptSchemas_VersionRestrict. This option restricts using the schemas containing the version specified in the document only.

Process of Selecting the Implementation Guideline.

  1. Version/Release/Industry is determined.
  2. Version information is used to search through all external guidelines already loaded for the controlling agency (X12/EDIFACT) of the document.
  3. If the industry is specified in the document, the object attempts to match it exactly with an external implementation guideline with the same industry. Otherwise it matches the versions only. If a match is found, then the external schema is used.
  4. If there is no exact match found, it determines if an industry was specified and, if there is, it gets the next higher version/release and attempts to do another search on this version information in the loaded external guidelines; if found it will use this schema. If not found, it will use the actual version without the industry and do another search.
  5. If there is no exact match to the version (with or without the industry), it attempts to match it to a schema that contains a version that is closest to the requested version. If there is a close matching version detected, then that schema is used.
  6. If no match is found in the external guidelines then the search starts all over again using the Standard Reference guideline.

Methods

Properties