This chapter provides an overview of the Ensemble tools that you can use to work with EDIFACT schemas and documents. It contains the following sections:
The EDIFACT Schemas page enables you to import and view EDIFACT schema specifications (select Ensemble > Interoperate > UN/EDIFACT > UN/EDIFACT Schema Structures).
On this page, you can do the following:
View the EDIFACT schemas that have been loaded into this Ensemble namespace. To do so, click View All Schemas.
Import EDIFACT schemas into Ensemble. To do so, click Import Schema from File. Then use Browse to choose a file and click OK.
Remove a saved EDIFACT schema. To do so, click Remove Schema. Then select a schema category from the Choose Schema Category drop-down list, and click OK.The schema is immediately removed.WARNING:You cannot undo the Remove operation.
The table on this page shows the following information:
In each row, the two columns at far left uniquely identify the schema definition in this row:
Table rows are sorted according to the numbers and characters in the Category column.Each value in the Name column is a link. When clicked, this link displays a table that outlines the EDIFACT document structure in this schema definition, showing all of its segments and fields. You can click on any of the links in this display to drill down for more details about any item. Ensemble extracts these details from the .SETS, .SEGS, .COMS, .ELMS, and .CODES sections of the SEF file that you import to define the structure of this EDIFACT document.
Category — The schema category
Name — The document structure
Base — For a custom EDIFACT document structure, this column identifies the standard EDIFACT document structure on which this custom structure is based.
Description — A title that describes the contents of the EDIFACT document. This Description is not a string that you enter as a comment or annotation. Ensemble extracts the text from the .INI section of the SEF file that you import to define the structure of this EDIFACT document.
Also see “Importing EDIFACT Schemas Programmatically.”
For information on creating custom schema categories, see “Creating Custom Schema Categories” in Ensemble Virtual Documents.
The EDIFACT Document page enables you to display EDIFACT documents, parsing them in different ways, so that you can determine which DocType to use. You can also test transformations. The documents can be external files or documents from the Ensemble message archives.
To display this page, click Ensemble > Interoperate > UN/EDIFACT > UN/EDIFACT Document Viewer.
For general information on using this page, see “Using the Document Viewer Page” in Ensemble Virtual Documents.
You can load SEF files programmatically as follows:
Start a Terminal session.
Change to an Ensemble namespace and issue the following command:Do ##class(EnsLib.EDI.SEF.Compiler).Import(filename,"EDIFACT")Where filename is the full pathname of the SEF file and“EDIFACT”is needed to override the class default value for filetype.This command imports the data from the SEF file and makes it available as a schema definition in Ensemble.
Ensemble creates a name for the new schema category from the first piece of the first line in the .INI section of the SEF file. For example, in the file D96A.sef you might see this:
.INI D96A,,D 96A,UN,D96A,D96A schemaThe extracted schema category has the nameD96A.Due to the schema naming convention, if you want to edit a SEF file to customize it, InterSystems suggests you first change the text in the SEF file that provides its category name, so that you can distinguish your version from any other SEF file that you also import into Ensemble.
A SEF file may contain syntax errors. If so, Ensemble issues an error message and identifies the location of the error in the SEF file.
For reference, this section lists the classes that Ensemble provides to enable you to work with EDIFACT documents.
||Each of these EDIFACT business service classes uses a different adapter, as indicated by the class name.|
|Business processes||EnsLib.MsgRouter.VDocRoutingEngine||This class is the standard virtual document routing process.|
||Each of these EDIFACT business operation classes uses a different adapter, as indicated by the class name.|
|Messages||EnsLib.EDI.EDIFACT.Document||This is a specialized message class to carry EDIFACT documents as Ensemble virtual documents.|
|Search tables||EnsLib.EDI.EDIFACT.SearchTable||This is a specialized search table class for EDIFACT documents.|
You can also create and use subclasses of these classes.
The business host classes include configurable targets. The following diagram shows some of them:
For information on other configurable targets, see “Reference for Settings.”