BizTalk Gurus

Pipeline error with Flat File Disassembler and Optional XSD attributes

rated by 0 users
Not Answered This post has 0 verified answers | 1 Reply | 1 Follower

Top 500 Contributor
3 Posts
Massimo Lisignoli posted on Mon, Jun 22 2009 4:05 AM

Hi All,

I have created an xsd shema with Flat File Schema Wizard, starting from a flat file.

This flat files comes from a BackOffice styem and I have noticed a change in the flat file structure:

from specs, there is a header line, some lines containing data and a trailer line. The header lenght is 23, but it is possible that a flalt file can be created with some other chars at the end of the header line, so the lenght is not 23, but could be more and I can't know the size.

So I added an attribute, called Optional with pos_lenght set to 50 and added the "use" attibute set to "Optional".

I send the flat file with the "alternative schema" but the pipeline gives me an error, despite the attribute is optional.

Error before adding Optional attribute:

Exception - There was a failure executing pipeline "pipeline_name". Error details: "Unexpected data found while looking for:
'\r\n'
The current definition being parsed is Header. The stream offset where the error occured is 23. The line number where the error occured is 1. The column where the error occured is 23.".

 

Error with Optional attribute:

Exception - There was a failure executing pipeline "pipeline_name". Error details: "Unexpected data found while looking for:
'\r\n'
The current definition being parsed is Header. The stream offset where the error occured is 73. The line number where the error occured is 2. The column where the error occured is 42.".

 

Someone have an idea in order to support this scenario?

Thanks in advice.

 

Massimo

 

All Replies

Top 500 Contributor
3 Posts

I found a solution adding the Optional attribute, set the Use Requirement property to Optional, then at the schema level I set this properties:

Allow Early Termination = yes

Early Terminate Option Field = yes

Parser Optimization = Complexity

 

Here the article where I found the solution: http://blog.solidsoft.com/blogs/russells_blog/archive/2006/06/15/39.aspx

Hope this helps!

Page 1 of 1 (2 items) | RSS