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.)
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).
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.
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.
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) :
- <?xml version=“1.0” encoding=“UTF-8”?>
- <ns2:AttachmentGroup xmlns:ns2=“Sample2.Namespace” Id=“2.000003590486”>
- <ns2:Locale/>
- <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
- <ns2:LastModifiedDate/>
- <ns2:LifeCycleId/>
- <ns2:Attachments>
- <ns2:Attachment Id=“1”>
- <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
- <ns2:LastModifiedDate/>
- <ns2:LifeCycleId/>
- <ns2:Mime>Text/XML</ns2:Mime>
- <ns2:AttachmentData>VEhJUyBJUyBBIFRFU1QgVEVYVCBTQU1QTEU=</ns2:AttachmentData>
- <ns2:AttachmentReason>Order</ns2:AttachmentReason>
- </ns2:Attachment>
- <ns2:Attachment Id=“2”>
- <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
- <ns2:LastModifiedDate/>
- <ns2:LifeCycleId/>
- <ns2:Mime>Text/XML</ns2:Mime>
- <ns2:AttachmentData>VEhJUyBJUyBBTFNPIEEgU0FNUExFIFRFWFQgQVRUQUNITUVOVA==</ns2:AttachmentData>
- <ns2:AttachmentReason>Order</ns2:AttachmentReason>
- </ns2:Attachment>
- <ns2:Attachment Id=“3”>
- <ns2:CreatedDate>2012-07-18</ns2:CreatedDate>
- <ns2:LastModifiedDate/>
- <ns2:LifeCycleId/>
- <ns2:Mime>Text/XML</ns2:Mime>
- <ns2:AttachmentData>VEhJUyBJUyBXSUsgV0lLIEEgU0FNUExFIFRFWFQgQVRUQUNITUVOVA==</ns2:AttachmentData>
- <ns2:AttachmentReason>Order</ns2:AttachmentReason>
- </ns2:Attachment>
- </ns2:Attachments>
- </ns2:AttachmentGroup>
For each node evaluated by the XPath expression, a transaction is generated and passed downstream to the directory transport.
This concludes this demonstration of a content-based data forking.