This blog will NOT change! Well… personal blog entries will not appear anymore, but other than that, I will still be blogging about technological abnormalities, funny things, strange things, errors, and what not…

The other day a developer who needs to call a BizTalk exposed web service approached me and told me that there was an error in the wsdl – something about the Response having the wrong fields.

So, I fixed it – I changed the XSD and ran the WCF Service Publishing Wizard again.

I called the developer and told him that everything was fine now. He refreshed his service reference and told me that everything was just as it was before. So I thought; Restart IIS.. and I did. Developer goes: Jan, what is wrong with you? Everything is still the same!

So now I actually need to start thinking…

Turns out, that silly I just did this:

Made my changes to the XSD

Recompiled

Run the Wizard

Point to the newly compiled assembly

Finish the wizard

BUT, what I forgot was to deploy the newly created assembly… or at least GAC it. Because the wizard, even though you point to a .DLL in the file system, will look for the assembly in the GAC with the same strong name and used that instead of the .DLL you chose. To me this is really silly… It could at least provide a warning that it will ignore the assembly I chose before ignoring it.

Anyway, after deploying the new assembly, everything worked just fine.

If you read the documentation for Correlation Sets (here), you will see that it clearly states that:

“Each correlation set supports a maximum of three parameters.”

Now, the documentation for BizTalk 2010 is still subject to change, but you will find the same text in the documentation for previous versions.

The funny part is, that inside the Orchestration View, you are allowed to add as many properties to your Correlation Type as you please:

You will get no compiler error, as I would have expected, and no compiler warning, either.

I implemented a small orchestration that uses the Correlation Type seen above and it looks like this:

Basically, a message in, a transformation, an output and then a response back in. The “msg_FirstOut” initializes the correlation set and the “msg_SecondIn” follows it.

As mentioned, the compiler will not complain at all and I can deploy the solution. Once I send a message through, an instance subscription is created once the send shape has finished, and this surprisingly looks like this:

As you can see, ALL five properties are used in the instance subscription, which in effect means that the documentation is wrong.

So this brings me to the point; The documentation states, that you can only have three parameters (not sure why they call them parameters) in a Correlation Set, but this actually ONLY applies to Correlation Sets used in Convoys.

If I change my solution to utilize a parallel convoy like this:

or to be a sequential convoy like this:

then I still get no compiler warning or error no matter how many properties I have in my Correlation Type, but if I deploy the solution and try to start the orchestration, I get this error message:

“The maximum number of convoy set properties has been exceeded. A convoy set can only contain up to 3 properties.”

Now, you may very well ask, what is a convoy set? And yes, it is a bit confusing that the error message uses a term that is actually internal to BizTalk and not something your average BizTalk developer cares about. But a convoy set is simply a correlation set that is used in a convoy.

So this means, that for correlation sets that are used for convoys you can only have three properties, which actually comes from the fact that the table “ConvoySets” in the MessageBox database has three columns called “uidPropertyID1”, “uidPropertyID2”, and “uidPropertyID3” which contain GUIDs that are the GUIDs of the properties in the correlation set. So since only three fields exist in the database, only three properties can be in a convoy set.

So to me, it would nice if:

The documentation was clear about the fact that the limitation only applies to correlation sets used in convoys

The compiler would provide an error if you use more than three properties in a correlation set used in a convoy so you don’t ahve to wait until starting the orchestration to find that out.