Re: Interchange pipeline failure
- From: "Greg Forsythe" <greg.forsythe@xxxxxxxxx>
- Date: Wed, 6 Dec 2006 07:48:33 +1300
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 thisWell, it ain't pretty, but...
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.
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
.
- References:
- Re: Interchange pipeline failure
- From: Wade Ding
- Re: Interchange pipeline failure
- From: Peter
- Re: Interchange pipeline failure
- From: Wade
- Re: Interchange pipeline failure
- From: Jan Eliasen
- Re: Interchange pipeline failure
- From: Peter Bradley
- Re: Interchange pipeline failure
- From: Jan Eliasen
- Re: Interchange pipeline failure
- From: Peter Bradley
- Re: Interchange pipeline failure
- From: Greg Forsythe
- Re: Interchange pipeline failure
- Prev by Date: Re: Interchange pipeline failure
- Next by Date: Re: SQL Port: using of the ROLLBACK
- Previous by thread: Re: Interchange pipeline failure
- Next by thread: Re: Interchange pipeline failure
- Index(es):
Relevant Pages
|