I am refactoring a BizTalk Application. The existing schema has the structure below, representing an invoice, where Level1 is the header, and Level 4 are the multiple line items.
In the old 2010 version of the app, it writes out data one invoice at a time, and has a Send Pipeline using the flat file schema. We are trying to improve old systems and move them to 2013.
I added a Receive Pipeline to read the data back in, and it works fine for a single invoice. But if the file has several invoices in it, it fails.
Can I tweek the schema I already have (vs. having to re-run the wizard) to allow for multiple invoices in the same file? For example, add a "Invoice" record that contains both Level1 and Level4?
[The ultimate goal is to add a Level 0 as well, which includes the total invoices for a the day, and to do that in a map vs a pipeline, as per our architect's preference.]
I tried the following, and get this error:
Reason: Unexpected end of stream while looking for: ','
I used similar steps to BizTalk FlatFile Schema multiple repeating records:
- Added an Invoice record, and put Level 1 and Level 4 under it.
- Set the record to unbound
- Set Child order Infix
- Child delimiter type to Hex
- Child delimiter to 0x0D 0x0A
If I try "Child Delimiter" - "None", then I get this error:
Reason: Unexpected data found while looking for: $Delimited$
Then I tried adding the "Tag identifier" (setting to "Level1" and "Level4" respectively). In that case the file with one invoice serialized, but the file with 3 invoices gave a mystery error:
The Messaging Engine encountered an error during the processing of one or more inbound messages.
Sample data:
Level1,,VO,TEST01,12/17/2018,34093092-1,,12/17/2018,60,1075,0,A,,,,12/17/2018,2/15/2019,2/15/2019,,,2000,1000,,1010,1000,,,,,EP
Level4,N,1200,,,1000,INDFRT-ECO,0,,0,145.72,7,34093092-448-887,,,,,,,,,,,,,,,,,
Level4,N,1200,,,1000,INDFRT-ECO,0,,0,802.67,7,34093092-492-930,,,,,,,,,,,,,,,,,
Level4,N,1200,,,1000,INDFRT-ECO,0,,0,126.61,7,34093092-833-096,,,,,,,,,,,,,,,,,
Level1,,VO,TEST01,12/17/2018,34068721-1,,12/17/2018,60,1250,0,A,,,,12/17/2018,2/15/2019,2/15/2019,,,2000,1000,,1010,1000,,,,,EP
Level4,N,1200,,,1000,INDFRT-ECO,0,,0,1250,7,34068721-492-930,,,,,,,,,,,,,,,,,
Level1,,VO,TEST01,12/17/2018,34094975-1,,12/17/2018,60,595,0,A,,,,12/17/2018,2/15/2019,2/15/2019,,,2000,1000,,1010,1000,,,,,EP
Level4,N,1200,,,1000,INDFRT-ECO,0,,0,142.8,7,34094975-448-887,,,,,,,,,,,,,,,,,
Level4,N,1200,,,1000,INDFRT-ECO,0,,0,452.2,7,34094975-492-930,,,,,,,,,,,,,,,,,


