Integration Engine Solutions to Connect Anything to Anything

Log out?

eiConsole v.24R1
Tutorial & Working Directory

eiConsole Tutorial – Topology

Splitting Attachment Data (Forking)

Note: The Quick Start and Foundation tutorials should be completed before proceeding with the Topology Tutorials.


Overview

This interface demonstrates how to perform content forking; if you have a transaction with multiple “attachments” or a single incoming data stream representing multiple outgoing streams, this is the function you need to perform. In addition, 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:

Core Concepts

How to Run This Example

You may run this from the eiConsole Testing mode at any point in the process prior to the routing module itself, using the attached document input-sample.xml.

How it Works

The forking module is configured in the Source format.

When 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 from 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.


Before You Begin

Zip File IconSplitting Attachment Data
Working Directory

Download the Splitting-Attachment-Data-Forking-Working-Directory.zip file with the sample Working Directory and unzip it on your computer to a convenient place. In our case, it’s c:\Users\{USER _NAME}\PilotFish eiConsole Working Directories\Splitting Attachment Data (Forking) where {USER_NAME} is the user’s name.

Open the eiConsole, browse to the Splitting Attachment Data (Forking) folder icon, and open it. The fully configured route (Splitting Attachment from Data) is included in the working directory.  Your Route File Management screen will open as shown below.

Double-click on the Splitting Attachment from Data route.


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

Tutorial for Splitting Attachment Data in a Route.


Listener Configuration

The Listener polls a directory set. As in the previous tutorials, we use the relative path to our directory ..\..\in. The absolute path is c:\Users\{USER _NAME}\PilotFish eiConsole Working Directories\Splitting Attachment Data (Forking)\in.

The sample file intended to be used with this interface is provided alongside this instructional guide. It is input-sample.xml. You can find it in the c:\Users\{USER _NAME}\PilotFish eiConsole Working Directories\Splitting Attachment Data (Forking)\data folder.

Listener Polling Options Panel.


Transport Configuration

The Transport uses a directory that is set here. Similar to the Listener, we use a relative path ..\..\out. This means the already created folder is in our Working Directory c:\Users\{USER _NAME}\PilotFish eiConsole Working Directories\Splitting Attachment Data (Forking)\out.

Transport Directory Configuration Panel


Forking Configuration

When viewing the Transaction Forking Configuration dialog box, you will notice an XPath expression and namespaces; the namespaces define prefixes for the XPath configuration. The XPath defines which elements from the original sample file will be output.


Forking Configuration Panel for 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 is in the input-sample.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 3 attachments here, so when this is executed in the Testing Mode, we should see 3 outputs; verify this by running this transaction in Testing Mode. In order to go into Testing Mode, click Mode on the main menu and then click Testing Mode in the drop-down list.


Once in Testing Mode, place the input-sample.xml file found in ..\Splitting Attachment Data (Forking)\data into ..\Splitting Attachment Data (Forking)\in directory. All the question marks are replaced by green checkmarks.


Check each attachment by clicking Testing Results and then clicking the View Stage Output button.

Route Testing & Data View


Output Files

A transaction is generated and passed downstream to the directory Transport for each node evaluated by the XPath expression.


We use the input-sample file name and the xml extension for the output of this Transport. Note that because we have 3 incoming transactions that will share this information, the output file name will have a number appended to the end, subsequent to the first file output.

This concludes the demonstration of content-based data forking in PilotFish’s eiConsole.

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