Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Need to ignore Trailing characters. › Re: Need to ignore Trailing characters.
Hi Greg,
Thanks for the reply. I did try the above method previously (in most of the blogs, explanation for de-batching). I even tried with the Envelope approach. Both work alright, but in my case I get an extra error. I get the same problem for both approaches. I may need to do some changes in my schema to accomodate that change. I will mail you the schemas and example.
But I even explained the scenario here: If you might have experienced it prev, might get a fast solution.
************
I have a scenario where I need to de-batch a flat file. The flat file consists of many orders. Each Order has various records in it.
Eg: Flat file : 1st 2 fields can be used as TAG Identifiers.
00-header record1(CR+LF)
05-Order related Record 1A(CR+LF)
10-Order related Record 1B(CR+LF)
99-Trailer record1(CR+LF)
00-header record2(CR+LF)
05-Order related Record 2A(CR+LF)
10-Order related Record 2B(CR+LF)
99-Trailer record2(CR+LF)
and so On…
So I have an Order Schema (min occurs – 1 , max occurs 1) – Tag Identifier for Order Schema – 00. Order Record is delimited, where as its children – Header, Rel 1, Rel 2, Trailer are positional (all are compulsary). Child Order – Postfix , delimiter – 0x0d 0x0a
No TagID for Header Record as I have used it to identify Order Record, others do have a Tag Identifier (05, 10, 99).
Have an Envelope schema importing the Order Schema ( here I make it 1, unbounded ). Child Order – Infix , hex 0x0d 0x0a .
In the pipline I place the Order Schema and I set Recoverable Interchange processing – True (need to pass all the valid Orders through).
Testing: For a valid batch input – I get the de-batched output.
For an Invalid Order for a Batch input:
Order1 — valid
00headerdetails — Order2 – invalid
990000othertrailer fields — Order2
Order3 — Order3 valid.
My Input file has 3 orders in which Order 2 is invalid.
Problem:
While running the application. The valid files order1, order3 pass through (that is fine). Problem occurs with order2. I just need to get a single suspended message. But I get 2.
BizTalk takes the 00 after 990000otherTrailerdetails as the the TAG Identifier of Order Record. And tries to validate it. Because its not complete it fails to validate.
Its like I have an extra Order in my input. In the event viewer I expect 1 error (for a single invalid order2), but I get 2 errors(2 orders – order 2 split into 2).
How can I take care of this ??
Thanks in advance