Envelope Processing on Send and Receive Ports

Have you looked at the SDK example working with Envelopes in BizTalk 2004 for Flat Files and tried to get it to work with XML Documents?  Well, I did and I found it a little trickier than I expected.



Key Take Home Points:


– De-Batching / Envelope Processing for XML Document must take place on the Receive Port.  I have not been able to get it to work on the Send Port, but I am still trying.


– Properties can be promoted from the Header and demoted to the single messages


– No custom pipelines are required for Receive Port Processing as long as the Root Node Name and Namespace are unique throughout your entire deployed solutions.



DOWNLOAD: Get the sample here!



Set-up is easy, just unzip the SampleEnvelopes folder and put it on your C: drive.  Then, build and deploy the SampleEnvelopes project. I use early binding so the send and receive ports will be created for you. 


 


To run the sample, drop the start messages named StartFileInbound.xml into c:\SampleEnvelopes\In_Inbound.  You will get 3 messages in the Out_Inbound folder for each start message.  Also, note that the Orchestration will run 3 times.  Plus, I promote and demote Header information to show how it can be passed into the single messages.  If all else fails, read the ReadMe.txt file.


 


Take Away: Once you get the hang of XML Envelopes in BizTalk 2004 they can be a powerful tool for easy document splitting.

Envelope Debatching Inside a Pipeline

Working with envelopes in BizTalk Server is always a little tricky. This sample shows how to use an envelope to de-batch a larger Xml message.

Some Key Take Home Points:
– De-Batching / Envelope Processing for XML Document must take place on the Receive Port. I have not been able to get it to work on the Send Port, but I am still trying.
– Properties can be promoted from the Header and demoted to the single messages
– No custom pipelines are required for Receive Port Processing as long as the Root Node Name and Namespace are unique throughout your entire deployed solutions.

Get more information from the original blog post on this topic: https://www.biztalkgurus.com/biztalk_server/biztalk_blogs/b/biztalk/archive/2004/08/22/envelope-processing-on-send-and-receive-ports.aspx