The UN/EDIFACT messages are organized by directories. A directory is a complete collection of about 200 message types. A directory name (e.g. d.97.b) is created by the letter d for directory, the year of the definition (97), and an alphabetic character indicating the version within the year (b). The UN/EDIFACT message is referenced by a short name with six characters (e.g. ORDERS). The importer reads such a message and generates all necessary classes in the UML model.

The E2E UN/EDIFACT Directory Definition Importer allows to select the required UN/EDIFACT or ANSI ASC X12 messages from the directories for use within UML models. The E2E Builder provides the UN/EDIFACT Directories and the American standard ANSI ASC X12.
More details about using these classes and the EDIFACT adapter can be found in the Reference Guide.

To import their meta data, select Import > UN/EDIFACT Directory Definition from the E2E Model Compiler menu.
On the UN/EDIFACT Importer dialog, choose the designated message for the import as described in the following sections.

The Importer shows a tree with existing UN/EDIFACT Directory definitions.

On the first level, choose the message type EDIFACT or X12.

Navigate through the folders and select the designated messages from the required directory.

Only one message can be chosen at a time. In order to import an additional message, you need to start another import.

Click OK to start the import.

Select the UML model, in which the data should be imported. The uml source path of the current Builder project will be suggested.

Choose an XMI file and click OK.

After a few seconds, the chosen XMI file will be loaded. The imported types will be stored in different packages with names according to their content.
The generated packages and classes are described below.

You need to save the UML model to persist the imported entities and packages.

On importing an EDIFACT definition, you may get the following warning in the notification window:

Some tag values are not loaded. Check magicdraw.log file for details.

In the MagicDraw log file, you will then find a couple of the following errors:

[pool-MagicDraw-thread-20:Reload Module] ERROR FILES - Tag "xmlns:XML" not loaded, tag definition not found.
[pool-MagicDraw-thread-20:Reload Module] ERROR FILES - Tag "xmlns:xmi" not loaded, tag definition not found.
[pool-MagicDraw-thread-20:Reload Module] ERROR FILES - Tag "xmlns:Basic_Structure" not loaded, tag definition not found.
[pool-MagicDraw-thread-20:Reload Module] ERROR FILES - Tag "xmlns:FlatFile" not loaded, tag definition not found.
[pool-MagicDraw-thread-20:Reload Module] ERROR FILES - Tag "xmlns:EDIFACT" not loaded, tag definition not found.

You can ignore these errors. The imported EDIFACT will work nevertheless.

Generated Classes of the UN/EDIFACT Directory Definition Importer

The Importer generates several packages and classes. Generally, three packages will be created, e.g.

  • D02B.BUSCRD.xsd (selected message name)
  • D02B.segment.xsd
  • D02B.composite.xsd

Each package name begins with the directory name (e.g. D03B), followed by either the message name, the label segment, or the label composite.

Segments and composites are shared between messages of the same directory. If additional messages for this directory are imported, the additional segment and composite classes required for the new messages will be merged into the packages D02B.segment and D02B.composite.

For more details, refer to the description of UN/EDIFACT Message Processing in the Reference Guide.

Creating a Class Diagram for the Imported Types

Create a class diagram to visualize all imported classes and associations.

Mark all EDIFACT classes in the containment tree, and drag and drop them to the class diagram.

Select all classes with CTRL + A and click the right mouse button to open the context menu. Select Related Elements > Display Paths. This will display all associations between the related classes.

To show the hierarchic dependencies of the classes, click the right mouse button on a free space in the diagram pane to open the context menu. Select Layout > Layout Hierarchic Style or Layout > Layout Orthogonal Style The new class layout will be drawn.

Now, the class diagram represents the class structure of the imported EDIFACT Directory Data.

  • No labels