Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 133, comments - 178, trackbacks - 427

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Recoverable Interchange Processing in Biztalk 2006

Biztalk 2006 introduces many new and exciting features.  One of these new features is Recoverable Interchange Processing for inbound receive interchanges.

 

First off, what is an Interchange?  An interchange is simply an item received by Biztalk.  In Biztalk terms, an interchange is typically used to define a message that contains several messages inside it. Some typical examples are batch flat files and Xml envelopes.

 

A specific example of this is a flat file document that contains a Header and many Detail records like this:

 

If we were to debatch this message using the flat file disassembler it would produce three single records.  In this case, it is one interchange that will produce three messages into the message box.

 

In Biztalk 2004, if a single record inside the flat file contained bad data the whole interchange (i.e. all the single messages) would fail.  In some business scenarios this is the desired behavior. 

 

This should not be confused with Adapter Batching.  Adapter batching will pick up and process many different interchanges together inside a configurable (usually) batch.  The interchanges inside a batch can fail in Biztalk 2004, just not individual messages inside a specific interchange.  Got it?

 

Biztalk 2006 now allows the option to fail the whole interchange or process just the non-errored single messages.  This is called Recoverable Interchange Processing.

 

Setting this up is as simple as setting the RecoverableInterchangeProcessing flag to True inside the XmlDisassembler pipeline component.  This can be done at runtime inside the Biztalk Server Admin tool without having to recompile any code. 

 

As the single messages are passing through the pipeline, the pipeline sets a new message property called BTS.InterchangeSequenceNumber.  When a single message inside an interchange fails, the sequence number along with useful message information is written to the event log.

 

Enough of my rambling…  How about taking a look at this for yourself.

Note this is based off of CTP build of Biztalk Server 2006.

 

Watch the video: Recoverable Interchange Processing Video


Download the sample:
Recoverable Interchange Processing Sample

 

See the readme.txt for setup instructions for the sample.  The default install is not configured to support recoverable interchanges.  You will need to change the property.

 

One additional point, I have heard that recoverable interchange processing will only work on flat files that have tag identifiers defined on the records.  I have not verified this but it makes sense.

Print | posted on Tuesday, July 19, 2005 11:55 PM |

Feedback

Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

Hi. I downloaded the sample, imported the binding file, changed the recoverable interchange property to true and dropped in the failed message XML. Instead of the 4 valid messages being dropped in the OUT folder, I get an error ---An error occurred when parsing the incoming document: "The 'Record123' start tag on line 8 does not match the end tag of 'Record1234'. Line 10, position 5.".---

Basically the same behavior as without recoverable interchange. I restarted the host, but the behavior persists. Am I missing something?
4/24/2006 4:06 AM | Buzz
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

Hello.

Did you check the Receive Port to make sure the Enable Error Message Routing is checked?

I built the sample using the CTP build. It’s possible the binding file doesn’t work on the RTM. I haven’t gotten the same updated for RTM yet.

Stephen W. Thomas
4/24/2006 8:20 AM | Stephen W. Thomas
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

Thanks for the prompt reply Stephen. 'Enable routing for failed messages' was not checked on the receive port. I enabled it and restarted the application. But still no success. And yes, you were correct about me having the RTM.
4/24/2006 10:21 PM | Buzz
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

You might have to try restarting the host or at least waiting for the new config settings to be picked up. Through it happened right away but it might take a bit.

Other then that, I’ve tested that sample with RTM and it seemed to work. I imported the MSI through and not the binding files. Might want to try that route if nothing else works.

I have also seen another step by step guide on a Microsoft blog.

Stephen W. Thomas
4/26/2006 8:18 AM | Stephen W. Thomas
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

Hi,

I'm trying to process a large message inside BizTalk 2006 and I don't know if I'm using the best approach for that. Can I use interchange processing to accomplish the process of a message of 50 MB?

Best regards,

Maicom Kusma
3/29/2007 3:17 PM | Maicom Kusma
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

Looks like you just need to set the "ValidateDocument" flag on the Receive Location to False. When it is set to True, the batch document fails validation against the envelope schema - killing the whole batch. Setting this to False allows the batch (which is technically invalid against the envelope schema) to pass through the pipeline and be split. Following that, each individual child document is validated against the child schema - which for most people is probably the important factor.
4/12/2007 8:12 AM | Chris Leger
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

You dont need to set the ValidateDocument flag to false. If the validation fails, then the validation will fail even in the normal case when the recoverable interchange is not set the false
2/28/2008 7:17 PM | Madhumita Jena
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

I am using BizTalk 2006 R2 and have a "recoverable interchange problem" which I hope you might be able to

help me with.

I am using the XMLReceive pipeline and have set both the RecoverableInterchangeProcessing and

ValidateDocument property to True. I have also specified a single document and envelope for the SpecName

properties. I then pass in a simple document with 2 messages, one which will fail validation and one which

will pass. Example:

<Envelope>
<Employee />
<Employee ID="2" />
</Envelope>

The result is 2 suspended messages with the following errors:

Message 1: "The required attribute 'ID' is missing. The sequence number of the suspended message is 1."
Message 2: "Unknown. The sequence number of the suspended message is 2."

I would have expected the second message to have been published without error???

Any ideas?

Thanks,

Wayne
5/8/2008 9:24 AM | Wayne Beckley
Gravatar

# re: Recoverable Interchange Processing in Biztalk 2006

I failed to mention that I am using the SQL adapter. Could it be that the adapter cannot handle the recoverable interchange as it is transactional?
5/9/2008 3:50 AM | Wayne Beckley

Post Comment

Title  
Name  
Email
Url
Comment   

Powered by: