Re: Interchange pipeline failure

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



If you wanted to confirm that the record count at the end was correct, you
could create a property and promote the trailer record count into the
message context.
In a subsequent custom pipeline component you could check this property and
compare it to BTS.InterchangeSequenceNumber.
If they were different you could:
1. Abort the whole batch by throwing an exception (turn off Recoverable
interchange processing)
2. Add another property and promote an error message that could be used in
the orchestration to alert someone.

Greg

"Greg Forsythe" <greg.forsythe@xxxxxxxxx> wrote in message
news:Og5n8xJGHHA.2464@xxxxxxxxxxxxxxxxxxxxxxx
Peter,

There is another way of doing this:
Create a document schema with an optional trailer record.
This will debatch each record, with the last document having a trailer
record. This can be removed/ignored in the first map
I have attached a sample document schema

Greg

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003";
xmlns="http://PeterBradley.document";
targetNamespace="http://PeterBradley.document";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xs:annotation>
<xs:appinfo>
<b:schemaInfo standard="Flat File" root_reference="document"
default_pad_char=" " pad_char_type="char" count_positions_by_byte="false"
parser_optimization="speed" lookahead_depth="3"
suppress_empty_nodes="false" generate_empty_nodes="true"
allow_early_termination="false" early_terminate_optional_fields="false"
allow_message_breakup_of_infix_root="false" compile_parse_tables="false"
/>
<schemaEditorExtension:schemaInfo namespaceAlias="b"
extensionClass="Microsoft.BizTalk.FlatFileExtension.FlatFileExtension"
standardName="Flat File"
xmlns:schemaEditorExtension="http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions";
/>
</xs:appinfo>
</xs:annotation>
<xs:element name="document">
<xs:annotation>
<xs:appinfo>
<b:recordInfo structure="delimited"
preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" sequence_number="1"
child_order="postfix" child_delimiter_type="hex" child_delimiter="0x0D
0x0A" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="Record">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="1" structure="delimited"
preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" repeating_delimiter_type="char"
repeating_delimiter="~" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element maxOccurs="unbounded" name="Field"
type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left"
/>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="Trailer">
<xs:annotation>
<xs:appinfo>
<b:recordInfo sequence_number="2" structure="delimited"
preserve_delimiter_for_empty_data="true"
suppress_trailing_delimiters="false" tag_name="TT" />
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:appinfo>
<b:groupInfo sequence_number="0" />
</xs:appinfo>
</xs:annotation>
<xs:element name="recordcount" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo sequence_number="1" justification="left"
/>
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>


"Peter Bradley" <pbradley@xxxxxxxxxx> wrote in message
news:uo%23rTmEGHHA.1080@xxxxxxxxxxxxxxxxxxxxxxx
Jan,

I'm impressed.

With any luck, I'll be able to study your solution later on today.

I was going down the route of producing an intermediate XML file. Or
trying anyway. So far I've got to the position where I can create an XML
version of the flat file and output it to a file drop. What I was
thinking of next was to use this as input having defined envelope and
message body schemas. My previous attempts have foundered because (I
think) BizTalk used the full schema instead of the envelope + body
schemas in the XML pipeline. To avoid this, I'm carrying out the XML
processing in a new project (assembly), which will not reference the flat
file processing project (assembly). So, hopefully, only the envelope and
body schemas will be available.

However, I notice from your blog that you couldn't get the XML processing
to work. I wonder if you could provide a bit more detail on the problem
you encountered. You mention namespaces, but I'm not quite sure I
understand the problem. Is there no way of changing the target
namespaces to make them the same? It's just an arbitrary URI, isn't it?

Any further information you can provide would be most gratefully
received. I know I could cheat and just use your work, but I think
understanding is as important as results in the long run.

Cheers


Peter


"Jan Eliasen" <eliasen@xxxxxxxxxxxxx> wrote in message
news:hta9n29pn98m6fojotm4f349t9t5v459l2@xxxxxxxxxx
On Mon, 4 Dec 2006 09:32:06 -0000, "Peter Bradley"
<pbradley@xxxxxxxxxx> wrote:

Any further help would be very gratefully received. If I can't get this
to
work, I just don't see how BizTalk is going to be a decent tool for us
when
we actually get something complex to do. We'd might as well write a
custom
.NET application.
Well, it ain't pretty, but...
http://blog.eliasen.dk/PermaLink,guid,31a59f27-a350-4325-987d-94b3da075f35.aspx

--
eliasen, representing himself and not the company he works for.

Private blog: http://blog.eliasen.dk

Private email: jan@xxxxxxxxxx






.



Relevant Pages

  • Re: how to return xml document from a web service
    ... what specific XML you expect. ... If you have a schema that defines what you expect, ... The second issue with this approach is that XML is not a string. ... >> methods from the wire transport. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • my first Tck/Tk program... and an XML question
    ... program which takes an XML Schema file, ... a basic XML tree and allows the user to save it. ... proc open_schema { ...
    (comp.lang.tcl)
  • RE: Data Insertion
    ... >The physical database structure is already in place. ... >I can determine the XML file and whether it contains a schema. ... In this particular case XML Schema is used to create a DataSet schema (set ... you're probably wondering how it's possible to load XML without XML ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: GEDOM as a database format
    ... format for meaning, that is, structure. ... If at least a basic XML schema is agreed on and XML used in any fashion, ... mothers: the autosomal/X mother and the mitochondrial mother .. ...
    (soc.genealogy.computing)
  • [ANN] New XML Editor in Visual Studio 2005 Beta 1
    ... Full syntax coloring for all XML and DTD syntax. ... Intellisense based on any DTD, ... Schema picker dialog for overriding schemas used for validation, which is then remembered as a document property in your solution. ... Goto Definition command for navigating between elements and their associated DTD, XDR or XSD schema definitions. ...
    (microsoft.public.dotnet.xml)