BizTalk Server MVP 2012

2 January 2012

Great news for me. Yesterday I received an e-mail from Microsoft telling me that I’ve been re-awarded the MVP title.

I would like to thank: – my MVP leads William Jansen and Jacqueline de Jong  – 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!


BizTalk Host Manager (nothing new :-()

7 August 2008

In 2005 I wrote a small tool called BizTalk Host Manager. This tool lets you quickly restart a host instance from the system tray. It is useful in scenarios where you have do to a lot of host restarts like developing (GAC newly build BTS assembly and restart host), debugging or performance testing.

Although it was written for BizTalk Server 2004 (.Net v1.1) it also works for BizTalk Server 2006 R1 and R2.

Apparently some people still use it because now and than I receive questions from people asking where it can be downloaded. Because I am not sure if it is still available from the old location, I’ll put it on my skydrive here.

I’m currently working on a new version of the tool. I hope to have it finished soon.


Debugging the disappearing SQL Add Adapter metadata wizard

28 July 2008

This afternoon I encountered a very annoying problem. I wanted to generate a schema with the add adapter metadata wizard to use with the SQL adapter. Normally the wizard shows a couple of screens in which you have to enter information and at the end (after pressing finish button) you’ll get a generated XSD. On my dev box when I was half way in the wizard I pressed next and …… nothing …… the Wizard just disappeared. No error in the eventlog, no error in Visual Studio.

While googling for a solution to this problem I found a number of people having exactly the same problem. Besides re-installing the entire machine there is no real solution mentioned. Because I didn’t want to reinstall my machine and because I think there are different causes for this problem I decided to take the hard way. Below is a description of the steps I took to save myself a lot of time:

I started by looking for the SQL Adapter binaries. No rocket science is needed to find out that those are located inside the ‘Microsoft.BizTalk.Adapter.SQLAdmin.dll’ assembly. This assembly can be found in the BizTalk installation folder.
The next step is to use Reflector together with Reflector FileDisassembler AddIn to ‘extract’ the source code of the wizard.
After fixing some references and other minor things I was able to recompile the .dll.
Next thing is to tell Visual Studio debugger to break on all exceptions instead of having the code handle them.  (You can do this in the dialog which appears by pressing CTRL-ALT-E in Visual Studio).
By starting a new Visual Studio instance and attaching the other one (with the extraced source) to it I was able to debug the wizard.
When I reached the point where the wizard was disappearing before I now got an exception telling me exactly what was wrong (see picture below). 

SQL Adapter FileNotFoundException

SQL Adapter FileNotFoundException

It turned out the installation of MSXML on my box was wrong/corrupted. I got a FileNotFoundException which basically told me that I had to (re)install MSXML. After reinstalling MSXML and throwing away the decompiled source (to keep MS people happy ;-) ) the wizard was working OK.

I was very happy that I reduced completely reinstalling the BTS box to just reinstalling MSXML.


Create message instance from multiroot XSD using DocumentSpec

19 June 2008

Sometimes you’re in a situation where you need to create a message from scratch. Yossi Dahan wrote an excellent blog post on this topic. As shown by this post there are a number of options to achieve this.

 

 

One option is to use the undocumented BizTalk Document Specification (DocumentSpec) API. Although this way of creating a message has some obvious disadvantages (see also comments to Yossi’s blogpost) it can be the best option in certain specific situations.

On of the things you need to do to create a message instance is to create a new instance of the DocSpec class. The constructor of the DocumentSpec class takes the .Net/BizTalk schema type name and the assembly display name that contains the schema as parameters. The code should look something like this:

 

 

string assemblyDisplayName = “TestSchema, Version=1.0.0.0, Culture=neutral, publicKeyToken=xxxxxxxxxxxxxxxx”;  

string schemaName = “TestSchema.MyTestSchema”

DocumentSpec docSpec = new DocumentSpec(schemaName, assemblyDisplayName);

 

 

This code works fine for single root schemas but you’ll get an error of you try this for a multiroot schema (an xsd that has multiple root nodes):

 

 

 

 

 

So how can I make this code work for multi root schemas? It took me a while to find out but the solution is simple. Just add the name of the root node of the message you want to create preceeded by a ‘+’ sign:

 

string assemblyDisplayName = “TestSchema, Version=1.0.0.0, Culture=neutral, publicKeyToken=xxxxxxxxxxxxxxxx”;  

 

string schemaName = “TestSchema.MyTestSchema+myRootNode1

 

DocumentSpec docSpec = new DocumentSpec(schemaName, assemblyDisplayName);

 

 

This will provide the DocumentSpec class with all the information needed to create a message instance. 


Call Rules Shape, Atomic Transactions and the Orchestration Designer

13 June 2008
One of the nice improvements in BizTalk 2006 R1 (BTS2k6R1) and higher is that you don’t need to use an atomic transaction scope around the “Call Rules” shape. I guess the reason for this is that classes used internally by the Business Rules Engine are now serializable while they were not in previous release.
 
Recently the orchestration designer in Visual Studio almost got me. I wanted to use a “Call Rules” shape en saw to my surprise that the shape was grayed out in the shape context menu. This is menu you get when you right click somewhere in the orchestration designer surface.
What was going on here? Was I wrong? Was it wishful thinking? Did this new feature only exist in my head? Do I still have to use the atomic transaction scope in my orchestrations? Because Visual Studio is always right and I’m always wrong I was about to add the scope to my orchestration.
 
Because I still felt a little bit disappointed I decided to have a quick look in the BTS2k6r1 help file. Nothing special was mentioned in the topic “How to Use the Call Rules Shape” however. Still curious I also looked at the same topic in the BTS2k6r2 help file. To my surprise the topic is updated and contains the following note:  
 
In BizTalk Server 2004, you can insert a Call Rules shape within an orchestration or a Scope shape with Transaction Type set to Atomic. In BizTalk Server 2006, you do not need to have an atomic scope to insert a Call Rules shape. You can drag a Call Rules shape into the Orchestration Design Surface from the Toolbox. However, in BizTalk Server 2006, the Call Rules menu item is disabled in the context menu if you try to insert a Call Rules shape inside an orchestration that does not have an atomic scope. This is a limitation with the BizTalk Server 2006 product.
 
So I was right! You don’t have to use an atomic transaction scope anymore. Apparently there is a bug in the orchestration designer. You can only drag a call rules shape from the toolbox to the orchestration designer surface. The same option can only be used from the context menu if you are inside a scope.
 
I really wonder what the reason for this is? Is it just a bug? And why didn’t they solve this in BTS2k6r2? And also will it be solved in the coming R3.
 
Anyway what point do I want to make here? 
  • Visual Studio is not always right. In rare cases you’re right and Visual Studio is not! :-)
  • You don’t have to use an atomic transaction scope anymore when you want to use the “Call Rules” shape.

Follow

Get every new post delivered to your Inbox.