How to survive the XmlDisassembler

22 April 2011

The XmlDisassembler pipeline component in BizTalk Server basically does three things:

  1. promoting properties (including the message type)
  2. validating incoming documents (if turned on)
  3. disassemble batches into body messages

Sometimes situations can occur where you want to process an envelope message but you don’t want to have it disassembled into separate body messages.

For example when receiving a message that contains a lot of data in the header of the envelope that is needed in the body of a message further on in the process. You then ideally want to use a map to copy over this header data into another message. If the port receiving this message uses the XmlDisassembler component the envelope will be processed and the header information is “gone”.

You can of course promote everything in the header to the context but that leads to a lot of data in the context. Besides that a considerable amount of code (distinguished fields and xpath statements in expression shapes) is needed to get the context properties into the message later on.

Another and, in my view, more elegant way to do this is by setting the value of a special property to true on the context of the envelope message before it is processed by the XmlDisassembler. The property is called ‘PromotePropertiesOnly’ and resides in the ‘http://schemas.microsoft.com/BizTalk/2003/xmlnorm-properties’ namespace.

A very simple pipeline component can be used to do this:

public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)
{
pInMsg.Context.Promote("PromotePropertiesOnly",
"http://schemas.microsoft.com/BizTalk/2003/xmlnorm-properties", true);

return pInMsg;
}

After setting this property will still have the functionality of the XmlDisassembler (like property promotion, setting the message type, etc.) but the debatching is skipped.

The property is available and can be used in all versions of BizTalk Server (2004, 2006 (R2), 2009 and 2010).


PowerShell provider 1.2.0.1 released

25 February 2011

A short post to let the users of the PowerShell provider for BizTalk know we have released a new version.

In the previous versions in some circumstances the provider (and PowerShell runtime) crashed when adding a new resource using the new-item cmdlet. This, among some other things, has now been fixed in release (v 1.2.0.1).

You can download the new version from here.

Thanks to Maxime for helping me fix this bug.


BizTalk Server MVP 2011

1 January 2011

Great start of 2011 for me. Today I received an e-mail from Microsoft telling me that I’ve been re-awarded the MVP title.

This is the second time for me. The first year has been an awesome experience. The title gave me the opportunity to do great things and meet inspiring and very skilled people.

I would like to thank:
- my MVP leads William Jansen and Gaby Lieuw 
- Ed Hickey and all other Microsoft employees involved
- people at Aviva Solutions
- and finally many thanks to Ivanka for her support and patience

I’m looking forward to another great year!

Happy new year everyone!


Visual 2010 BizTalk project woes

18 November 2010

I sometimes find myself in a situation where I need to make direct modifications to the XML code of an orchestration, map or pipeline. In Visual Studio you can do this easily by opening the file with the non default editor (right click orchestration file, ‘Open With…’ and ‘XML (Text) Editor’).

I encounter very strange behavior for the different file types (orchestrations, maps, pipelines) after I opened them in the Visual Studio 2010 XML editor. For schema files the behavior is as expected. For the other file types it looks like the default editor binding is missing after opening the file in the XML editor.

Orchestrations:

Steps to reproduce:
- right click orchestration (.odx) file in solution explorer
- choose ‘Open With…’
- choose ‘XML (Text) Editor’
- close the orchestration (save is not necessary)
- open the orchestration with the default editor (double click)

Results:
The orchestration opens but displays a very strange screen. It looks like a mix between the orchestration and the code behind:

image

Besides this there are the context menu for the specific orchestration has changed. Two options are added:

image

Maps:

Steps to reproduce:
- right click map (.btm) file in solution explorer
- choose ‘Open With…’
- choose ‘XML (Text) Editor’
- close the map (save is not necessary)
- open the map with the default editor (double click)

Results:
In this case the map opens with the correct mapper editor but there are also two extra options added to the context menu as is the case with orchestrations.

Pipelines:

Steps to reproduce:
- right click pipeline (.btp) file in solution explorer
- choose ‘Open With…’
- choose ‘XML (Text) Editor’
- close the pipeline (save is not necessary)
- open the pipeline with the default editor (double click)

Results:
For pipelines Visual Studio opens the XML representation when double clicking. It seems as if the default editor has changed.

image

This is very annoying. Is it just me? Do you have this too at your development box?

Workaround:
The workarounds I found are:
- Choose ‘Open with…’ and pick the default editor from the list.
- Open the BizTalk project (.btproj) with notepad and remove the ‘<subType>’  xml nodes for every file. After open the project again in Visual Studio it is fixed (until you open the file with the XML editor again).

I’m using BizTalk 2010 RTM (developer edition), Visual Studio 2010 Ultimate. Do you have this too?

I raised this issue on the Microsoft connect site.


BTUG meeting 2 december: BizTalk 2010

15 November 2010

nederlandse-vlag

Op 2 december a.s. geef ik samen met Steef-Jan Wiggers een presentatie over BizTalk Server 2010.

Wil je weten wat er allemaal nieuw is in BizTalk 2010 kom dan naar de BTUG meeting op 2 december.

Naast onze presenatie zijn er nog twee andere presentaties:

- BizTalk 2010 en Trading Partner Management  (Richard Sargeant)
- Extended and Scalable integration through the cloud (Gijsbert in ’t Veld)

Note to international readers of my blog:
The above post is aimed at the Dutch community and therefor only published in Dutch language. Unless you want to learn Dutch you can safely ignore it (I realize that is probably true for all my posts). Smile


Follow

Get every new post delivered to your Inbox.