Integration Engine Solutions to Connect Anything to Anything

Log out?

eiConsole v.18R2
Tutorial & Interface

eiConsole Tutorial Basic

Splitting Attachment Data (Forking)

Overview

This interface demonstrates how to perform content forking; if you have a transaction with multiple “attachments,” that is, a single incoming data stream that represents multiple outgoing streams, this is the function you need to perform. This interface demonstrates how to use the eiConsole to separate a single data stream into multiple data streams each based on a subset of the original stream’s contents for independent handling and processing.

Transaction splitting may be used when:

  • An incoming transaction contains multiple data payloads
  • An incoming transaction needs to have different components processed separately

Core Concepts:

  • Forking
  • XPath

How to Run This Example

You may run from the Listener by configuring the attached environmental properties file, or from the eiConsole testing mode at any point in the process prior to the routing module itself, using the attached document Sample2.xml.

How it Works

The forking module is configured in the Source Format.

Viewing the Forking configuration, you will notice an XPath expression and namespaces; the namespaces define prefixes for the XPath configuration. The XPath defines which elements out of the original sample file will be output.

For each Node evaluated by the XPath expression, a transaction is generated and passed downstream to the directory transport.

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.)

Sample Data IconSample Data
Configuration File IconConfiguration File
Interface Download IconInterface 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 log in 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).

Sample Route for Splitting or Forking Tutorial.

This interface has three functioning pieces: the listener (the Listener stage), the listener transformation forking (the Source Transform stage), and the transport (the Transport stage).

Listener Configuration

The listener polls a directory set by a configuration value stored in the environment properties file (included with this interface) every five seconds. Using environment properties will be explained in a later tutorial. The sample file intended to be used with this interface is provided alongside this instructional guide; it is Sample2.xml.

Sample Listener Configuration for the Route.

Forking Configuration

Viewing the Forking configuration, you will notice an XPath expression and namespaces; the namespaces define prefixes for the XPath configuration. The XPath defines which elements out of the original sample file will be output.

Forking panel options for transforming the source data in the route.

In our case, the forking configuration uses a simple XPath-based rule, which searches the document for all available “Attachment” objects, and creates new Transactions out of them.

Below is our sample transaction (this contains in the Sample2.xml file) :

  1. <?xml version=“1.0” encoding=“UTF-8”?>
  2. <ns2:AttachmentGroup xmlns:ns2=“Sample2.Namespace” Id=“2.000003590486”>
  3.         <ns2:Locale/>
  4.         <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
  5.         <ns2:LastModifiedDate/>
  6.         <ns2:LifeCycleId/>
  7.         <ns2:Attachments>
  8.                <ns2:Attachment Id=“1”>
  9.                       <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
  10.                       <ns2:LastModifiedDate/>
  11.                       <ns2:LifeCycleId/>
  12.                       <ns2:Mime>Text/XML</ns2:Mime>
  13.                       <ns2:AttachmentData>VEhJUyBJUyBBIFRFU1QgVEVYVCBTQU1QTEU=</ns2:AttachmentData>
  14.                       <ns2:AttachmentReason>Order</ns2:AttachmentReason>
  15.                </ns2:Attachment>
  16.                <ns2:Attachment Id=“2”>
  17.                       <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
  18.                       <ns2:LastModifiedDate/>
  19.                       <ns2:LifeCycleId/>
  20.                       <ns2:Mime>Text/XML</ns2:Mime>
  21.                       <ns2:AttachmentData>VEhJUyBJUyBBTFNPIEEgU0FNUExFIFRFWFQgQVRUQUNITUVOVA==</ns2:AttachmentData>
  22.                       <ns2:AttachmentReason>Order</ns2:AttachmentReason>
  23.                </ns2:Attachment>
  24.                <ns2:Attachment Id=“3”>
  25.                       <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
  26.                       <ns2:LastModifiedDate/>
  27.                       <ns2:LifeCycleId/>
  28.                       <ns2:Mime>Text/XML</ns2:Mime>
  29.                       <ns2:AttachmentData>VEhJUyBJUyBXSUsgV0lLIEEgU0FNUExFIFRFWFQgQVRUQUNITUVOVA==</ns2:AttachmentData>
  30.                       <ns2:AttachmentReason>Order</ns2:AttachmentReason>
  31.                </ns2:Attachment>
  32.         </ns2:Attachments>
  33. </ns2:AttachmentGroup>

There are three attachments here, so when this is executed in the Testing Mode, we should see three outputs; verifying experimentally, by running this transaction in the Testing Mode:

View Route in Testing Mode

Transport Configuration

For each node evaluated by the XPath expression, a transaction is generated and passed downstream to the directory transport.

Transactions are evaluated & passed down to the Transport phase of the route.

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.

This concludes this demonstration of a content-based data forking.

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