Log out?

eiConsole Intermediate – Transformation / Data Mapping

eiConsole v.13.17R1
Tutorial & Interface 

Transformation Using Transaction Attributes

Overview

This interface demonstrates how to utilitize Transaction Attributes when transforming documents in the eiConsole, in this example using the filename of the incoming file. Transaction attribute based transformation may be used when: Data has been stored to a transaction attribute that needs to be utilized in the transformation Data needs to be written from a transformation into a transaction attribute.

The tutorial demonstrates how to utilize transaction attributes in data transformation; this is useful for getting meta information from listeners, such as when you need to know the filename a file was picked up as. It can also be used to store information which cannot be stored in the current transaction data, or for handling things such as images.

How to Use This Example

Click the links below for the files you will need for this tutorial, then download the INTERFACE to get started. (Once logged into the eiConsole it immediately shows up in your “PIE” inbox for use.)

Sample2 Data
Sample3 Data
Configuration File
Interface Download

Note: if you are not logged in to the eiConsole, or have arrived at this page via a browser, you will be prompted to login before the interface downloads into your eiConsole “PIE” inbox. Or if you have not downloaded and installed a FREE eiConsole Trial you will have the opportunity to register after you click the Interface Download link. Once you are logged in the interface will automatically download into your “PIE” inbox. First, you’ll see a screen pop up indicating that a new product is ready for download. Select the Download Now button. Once you’ve downloaded the Interface you can drag it into your current Working Directory and begin.

Next, follow the tutorial and walk through it step-by-step. You may check your work against the provided Route (Sample Data).

Double click the interface to open the Route

transaction-attributes-in-data-transformations-001-13-16-r3

This interface has three functioning pieces; the Listener, the listener transformation, and the transport.

Listener Configuration

transaction-attributes-in-data-transformations-002-13-16-r3

The listener polls a directory set by a configuration value stored in the environment properties file (included with this interface) every five seconds. The sample files intended to be used with this interface are provided alongside this instructional guide; they are Sample2.xml and Sample3.xml.

Transformation

transaction-attributes-in-data-transformations-003-13-16-r3

The transformation is relatively simple, performing a near one-to-one mapping, except for a single field; FileName.

transaction-attributes-in-data-transformations-003a-13-16-r3

To write a transaction attribute, navigate to the “Custom” tab in your Data Mapper palette, and select “Attribute” – “Get Transaction Attribute”. After dragging and dropping it to the desired Node, it automatically generates the XSLT necessary to read data in from a transaction attribute in your XSLT.

transaction-attributes-in-data-transformations-003b-13-16-r3

It will ask you to provide an attribute name.

In our case the Filename node is already mapped.

using-transaction-attributes-004-13-16-r1

You can test this directly in your XSLT; go to the Testing tab, and on the testing toolbar is an icon of a green pencil and notepad. Clicking this will bring up an attribute editor; this data will be given directly to the transformer when this test is executed. Enter attribute name com.pilotfish.FileName and the value TestName, and hit the Enter.

using-transaction-attributes-005-13-16-r1

The new element will appear in the results window:

using-transaction-attributes-006-13-16-r1

Transport Configuration

transaction-attributes-in-data-transformations-006a-13-16-r3

We use the original file name and extension for the output of this transport, information produced by the directory listener as a transaction attribute; note that, because we have three incoming Transactions which will share this information, the output file name will, subsequent to the first file output, have a number appended to the end.

Testing

Run the Testing Mode.

transaction-attributes-in-data-transformations-007-13-16-r3

Click on the Execute Test and copy the Sample2.xml file to the polling directory.

transaction-attributes-in-data-transformations-008-13-16-r3

Since our sample file is Sample2.xml the new node in the newly created file will contain the name of it – Sample2.

using-transaction-attributes-009-13-16-r1

This concludes this demonstration of using attributes in transformations.

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

Thanks!

Our editors are notified.

Close