how do I retain the order of published detail records within a header record?
book
Article ID: KB0076209
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Files for Unix and Windows
-
Not Applicable
-
Description
When publishing a file with the following structure the order of the detail records vary, how do I retain the order of published detail records within a header record? Header--------Detail A--------Detail B--------Detail C Which will give you a varied output(ie. c,d,a)
Issue/Introduction
how do I retain the order of published detail records within a header record?
Environment
Product: TIBCO Adapter for Files
Version: 6.x, 7.x
OS: All
--------------------
Resolution
When publishing a file with the following structure the order of the detail records vary, how do I retain the order of published detail records within a header record?
Header -------->Detail A -------->Detail B -------->Detail C Which will give you a varied output (ie. c,d,a)
Resolution: Currently it is not possible to specify the order of detail records within a header record. However, there are 2 possible workarounds:
1) If your original structure is:
Header -------->Detail A -------->Detail B -------->Detail C ,
By changing the Details to Headers, the FileAdapter will publish them in the order you have specified. For Example:
Header Header (which was originally detail A) Header (which was originally detail B) Header (which was originally detail C)
Please be aware that each header will be published in a separate message, but in the order you have specified. This may or may not be appropriate to your needs.
2) Depending on the File Layout and the requirements of the Subscriber, it maybe possible to preserve the File order and Header/Detail grouping by defining a N depth structure.
If your original structure is:
AAA (Header) -------->BBB (Detail A) -------->CCC (Detail B) -------->DDD (Detail C)
In the Paser, you can define the file as the following:
AAA (Header) | |------ BBB (Detail of AAA) | |-------- CCC (Which is a detail of detail of BBB) | |--------- DDD (Which is a detail of detail of CCC)