Log out?

eiConsole Advanced – Transformers

eiConsole v.13.17R1
Tutorial

Using the EDI Transformation Module

In this brief tutorial, we’ll cover configuring and using the EDI Transformation Module to convert ANSII 837 and similarly formatted documents to and from XML.

You’ll will need to download the Sample EDI file in order to complete this tutorial.

icon_sample-dataEDI Sample Data

Click this link if you require instructions on how to import an .eipb file.

Creating a New Route

edi-transformation-module-01-13-16-r3

We’ll begin by creating a new Route to configure for our transformation. Click the Add Route button, indicated above.

Naming the Route

edi-transformation-module-02-13-16-r3

You may now provide a name for the new Route. For this tutorial, we’ll simply call our Route EDI Transformation. Click OK after providing a name.

Opening the Route

Open the newly created Route for editing.

 edi-transformation-module-04-13-16-r3

With the Route opened you should see the main eiConsole screen.

Configuring the Source

edi-transformation-module-05-13-16-r3

Select the Listener stage, then select the Directory / File option from the Listener Type drop-down. You’ll then provide values for Polling Directory (here we’ve chosen C:\in), which is the location from which we’ll be searching for EDI files, and for Polling Interval, which is how often the directory is checked for new files.

Configuring the Target

edi-transformation-module-06-13-16-r3

Next we’ll need to configure a Target to send the transformed data to. Select the Transport stage, then Directory / File from the Transport Type drop-down. You’ll need to configure Target Directory, which is where the transformed result files will be placed, Target File Name, which is the file name (minus extension) of the resulting file, and optionally Target File Extension, which is the extension for the created file.

Adding a Source Transform Format

edi-transformation-module-07-13-16-r3

To configure our transformation, we’ll first need to add a new Format to the Source Transform stage. Click on the stage, then on the Add Format button. You’ll then be asked to provide a name for the Format; for this tutorial, we’ll simply use EDI Transformation.

Configuring the Transformation

edi-transformation-module-08-13-16-r3

With the new Format added, you should see the Source Transformation screen now showing configuration panels for both a Transformation Module and for XSLT. In the Transformation Module drop-down, select the EDI transformation module. This is the component that facilitates transformations between EDI and XML formats. There’s not a lot of configuration required here, but we’ll cover each item below:

  1. Use Friendly Names. This specifies if the resulting XML element / tag names should be named according to the intuitive or documentative names provided in the EDI standard. For example, instead of getting a tag name like “NM108”, you’ll be provided with “NM108_IdentificationCodeQualifier.” This can produce more verbose XML results, but can be very useful for mapping as well as for debugging.
  2. Validate Message. This will attempt to validate the EDI data against its detected format definition.
  3. Throw Exception on Invalid Message. If “Validate Message” is also checked, this will cause the component to fail if an EDI message does not match the format definition. The error message will provide validation details.
  4. Use Custom Metadata. This, in conjunction with the Custom Metadata File option, will enable you to provide an alternate format definition in an XSD format. This is not required or recommended for most users.
  5. Expected Message Type. This allows you to specify what message type (such as “837”) is expected by the transformation.
  6. Custom Metadata File. This is the location for the Use Custom Metadata option.

Switching to Test Mode

edi-transformation-module-09-13-16-r3

Now that our Route is fully configured we’ll want to test it. Go to the Route menu and select the Testing Mode item.

Configuring the Test

edi-transformation-module-10-13-16-r3

Once in Testing Mode, select the Source Transform stage, then click the Start Test Here and End Test After Here options. This will limit our test only to the selected EDI transformation stage. Select the From File for Alternate Testing Data.

Executing the Test

edi-transformation-module-11-13-16-r3

Next, click Execute Test. You’ll be asked to provide an input file representing the EDI input file to test against. Select a provided sample file or a file you have handy, then hit OK.

Reviewing the Results

edi-transformation-module-12-13-16-r3

After the test completes, you should see a green checkmark for a success. You can then click the View Stage Output button to see the results of the transformation.

The XML Results

using-the-edi-transformation-module-13-13-16-r1

The Stage Output Viewer should now show you the XML results of your EDI transformation. As the Route is currently configured these XML results will be delivered to the directory you specified in the Transport stage. You can also use this XML in the Data Mapper (see related tutorials) to transform this format to another, such as to another XML format, to Microsoft Excel worksheets, or even to do insertions into databases.

    to post comments

    This is a unique website which will require a more modern browser to work! Please upgrade today!

    Thanks!

    Our editors are notified.

    Close