Saturday, October 3, 2009

Hi all

Jon Skeet, who has been a C# MVP since 2003, as I understand it was to have his MVP renewed on October 1’st 2009, but his employer Google advised him not to be renewed, so he had to tell Microsoft to not consider him for renewal. You can see Jons blog entry here.

To be honest, I think it is very petty way Google is thinking.

So to Jon: Great work, keep it up, and hopefully either Google will come around or you will find a better job and get your MVP status back.


Saturday, October 3, 2009 2:40:03 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 

Hi all

Now, I am aware that people following my blog are probably very likely to follow Richard Seroters blog as well, but just in case you haven’t noticed, Richard tortured me with his 4 questions this time :-)

You can find his questions and my answers here.

Now, being interviewed by Richard and thus having a link to my blog appear on his blog entry is bound to generate some traffic to my blog from people who either didn’t know me or didn’t visit my blog… So naturally, the first about 12 hour after Richard posted his interview, my blog was down because the webhosting company that hosts had changed something… or something else, who knows? :-)

As you can see, though, my blog is again up and running and will hopefully stay this way! :-)


Saturday, October 3, 2009 2:22:35 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Friday, September 18, 2009

Hi all

I am REALLY excited to announce, that I will be co-authoring a book on BizTalk. I will be a part of a terrific team consisting of

  • Anush Kumar
  • Brian Loesgen
  • Charles Young
  • Jon Flanders
  • Scot Colestock
  • Tom Canter
  • Me :-)

Together we will be writing “BizTalk Server 2009 Unleashed”, which is so new, that you cannot find it on the web page of the publisher or any other sites. It is so new, that we haven’t even signed our contracts with the publisher yet, which may cause someone to quit the project if they are not happy about the contract… so nothing promised yet.

But, needless to say, I am really excited, and giving the team, also feeling quite humble :-).

This will be my first book.



Friday, September 18, 2009 10:06:38 PM (Romance Daylight Time, UTC+02:00)  #    Comments [11]  | 

Hi all

So, sorry to see it, but it appears it has been almost two months since my last blog post – hope to get back on track soon.

Since the last time, I have installed Windows 7 RTM on my laptop, and one of the reasons I haven’t blogged is, that I couldn’t get Windows Live Writer Backup to restore my backup of Windows Live Writer from my old Windows XP installation. That turned out to be a silly thing… For others; You cannot restore using WLW Backup without having run Windows Live Writer first. It isn’t enough to install it, it must have been run also. Oh well.


I hope to entertain you all some more from now on…



Friday, September 18, 2009 9:55:49 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 

Hi all

Some weeks ago, I had a customer that had an Order XML and needed to fetch all the names of the ordered items based on the item number that was in the XML.

He contacted me because the solution he had thought of didn’t work. What he did was that he mapped the Order XML to a SQL Adapter schema that called an SP in SQL Server to get the item name based on the item number. The issue he ran into was, that the SP got called multiple times – once for each item, and the SQL adapter didn’t seem to batch all the results into one result for his orchestration.

So, given this simplified Order:

<ns0:Order xmlns:ns0="http://MultipleCallsToSP.Order">

He mapped it to this XML:

<ns0:GetItemNameRequest xmlns:ns0="">
  <ns0:GetItemName ItemID="21" />
  <ns0:GetItemName ItemID="42" /> 

This was then sent to SQL Server using the SQL Adapter to call a SP named “GetItemName” which just takes an ItemID (int) as parameter and returns the ItemName hat matches the ItemID.

Now, the schema that is generated for the SQL Server request actually doesn’t allow for multiple GetItemName elements to be created, but that is changeable :-) If you set it to have maxOcurs = unbounded, then it can occur multiple times, and what happens is that the SP is called multiple times. Unfortunately, only one of the ItemNames is returned – the rest is ignored.

So the customer came to me because naturally, he needed all the ItemNames and not just one of them. I have suggested 5 possible solutions, which I will describe here.

First option
Use the pattern described at to loop around the order lines and build the resulting XML one order line at a time.

Second option
Use enveloping in the receive location in order to get one orchestration started for each order line.

Third option
Use the Database Lookup functoid to retrieve the ItemName based on the ItemID

Fourth option
Generate a comma separated list of ItemID’s in the map, and let the stored procedure use that list to return the relevant ItemNames. This has some consequences for the stored procedure. Before it looked like this:

SELECT ItemNumber, ItemName
FROM Items
WHERE Items.ItemNumber = @ItemID

Now, it looks like this:

SELECT ItemNumber, ItemName
FROM Items
WHERE EXISTS (select * from dbo.Split(‘,’,@items) where [Items].ItemNumber = ID)

@items is the parameter for the SP, which is just an nvarchar that is to contain the comma separated list.

For this to work you need the Split function, which looks like this:

CREATE FUNCTION [dbo].[Split] (@sep char(1), @s varchar(512))
                WITH Pieces(pn, start, stop) AS (
                      SELECT 1, 1, CHARINDEX(@sep, @s)
                      UNION ALL      
                      SELECT pn + 1, stop + 1, CHARINDEX(@sep, @s, stop + 1)      
                      FROM Pieces      
                      WHERE stop > 0    
                 SELECT pn, CONVERT(int, SUBSTRING(@s, start, CASE WHEN stop > 0 THEN stop-start ELSE 512 END)) AS ID
FROM Pieces

In order to generate the comma separated list in your map, I have written two blog posts about this issue, which you can find at and

Fifth option
The fifth and last option i want to mention is, that with the new SQL Server LOB adapter from Adapter Pack 2.0, it appears that you can do it like the customer wanted to do it in the first place with sending one XML to SQL Server and getting an accumulated response back from SQL Server based on several calls to a stored procedure. I haven’t had time to test this, but look out for another blog post about this :-)


Hope this helps someone.



Friday, September 18, 2009 9:47:51 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Tuesday, July 28, 2009

Hi all

Just to let you know, I am now listed on along with lots of other cool BizTalk bloggers :-)


Tuesday, July 28, 2009 5:40:29 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Thursday, July 23, 2009

Hi all

I have just released version 5 of my pipeline components library.

It has the following additions:

  • SuspendAfterMap. In BizTalk 2009 (which is the only supported BizTalk version for this pipeline component) there has been added support for recoverable interchanges for errors occurring during mapping on receive ports after disassembling. This is achieved by setting a specific promoted property to “true”. I have created a pipeline component that will do this for you.
  • WriteProperties. This pipeline component serves almost NO purpose at all, except I used it for debugging to see what properties existed on a message going through BizTalk. It will write out all context of a message to the eventlog, one event at a time.

It has the following new features:

  • Promote. The pipeline component used for promoting a value based on an XPath expression and thereby enabling you to promote a specific instance of a reoccurring element has been enhanced by a “constant”. So instead of having to set the value of some property to the result of an XPath expression you can just enter a constant instead. If you enter both a constant and an XPath expression the constant wins. This new feature is quite handy if you need to set the value of for instance MIME.FileName to a specific value or any other property for that matter.

You can find the newest versions at


Thursday, July 23, 2009 12:26:18 AM (Romance Daylight Time, UTC+02:00)  #    Comments [2]  | 
Wednesday, July 22, 2009

Hi all

I have just released version 9.1 of my functoid library. Actually, nothing much new has appeared. I had accidentally left out the functoid I described at from version 9, so now it is reintroduced – and it has also been added to the documentation.

Find the newest version of the functoids library at – thanks.


Wednesday, July 22, 2009 11:59:05 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 
Tuesday, July 21, 2009

Hi all

I have been running into too many issues with BizTalk 2009 on VS.NET 2008 lately. This post is just to mention them and let everyone else know that they are not the only one – and that they will be reported to MS and hopefully fixed quickly.

Build action of schemas
Some times the “build action” of a schema in your BizTalk project is set to “None” instead of “BtsCompile”. When this happens, the schema is not compiled into the assembly and can therefore not be used for pipeline components, maps, orchestration messages, and so on. It happens if you drag a schema from your explorer into your project, but it also happens sometimes when you drag a schema between two projects inside VS.NET.

More build action of schemas
The above error could be more easy to live with, if it weren’t absolutely impossible to know when the “Build action” property of the schema in visible in VS.NET – some times the property is visible and you can change the value. Other times it is not. Quite confusing. I have found that if I add a schema to a project, then the property is suddenly visible for all schemas in the project. Change the ones that need changing and delete the schema you added.

Auto save a map before schemas are chosen
When you add a new map then at some point VS.NET auto saves the map, but if this happens before you have chosen both the source and destination schema you suddenly get an error, which you really do not expect, because you weren’t doing anything at the time of the error. This also occurred in previous versions of BizTalk.

Map looses information about schemas
I have seen several times, that even after choosing source- and destination schema for a map and dragging a couple of links in the map and saving it, then at compile time, I get an error about the map not having source- and destination schemas. So I need to choose them again, and redo all the links, because they have magically disappeared. This happens for maps that uses both schemas from the same project as schemas from referenced projects.

Output window
The output window seems to not always show all information when compiling/deploying. Some times the information comes all at the end instead of being written to the output windows as it happens. Other times, I can rebuild my entire solution and the output windows will only show me the one warning that occurred during compilation.

Dragging elements in Schema Editor
Dragging elements inside the schema editor has had me baffled since BizTalk 2002. Some times, I need more than 20 tries to get an element to be dragged – and sometimes it just works. Annoying? Indeed it is!

Copy local fails
If I have a project (P2) that references another project (P1), then after I have added an item to P1 and recompiled it, everything seems OK. BUT, if I then deploy from within V.NET, things start to go wrong. From then on, it seems that the “Copy local” property of the project reference is ignored. Whenever I recompile P2, I do NOT get the P1.dll copied to the local folder of P2. This causes all sorts of stuff as also explained here by Ryan:

Setting properties for more than one project at the same time
See here: for Ryans thoughts on this.


Tuesday, July 21, 2009 10:22:24 PM (Romance Daylight Time, UTC+02:00)  #    Comments [12]  | 

Hi all

Microsoft have finally released some pricing information about Azure. Find it here:


Tuesday, July 21, 2009 5:43:40 PM (Romance Daylight Time, UTC+02:00)  #    Comments [0]  | 

Theme design by Jelle Druyts