Biztalk 2004 Integration Experiences

Thursday, January 27, 2005

Microsoft BizTalk Server Adapter Migration Toolkit

Microsoft BizTalk Server Adapter Migration Toolkit has been released by Microsoft and I had an opportunity to take a look at this when it was in Private Beta. It would help a lot if you just want to migrate your Biztalk 2000 to Biztalk 2004 with minimal architecture changes.

Some of the Interesting things about this Toolkit is it has an adapter which is similar to Submit & SubmitSync methods in Biztalk 2002, so still you can continue using the old way. It could also convert Biztalk 2002 AIC's to custom adapters.

You can download it from here

Wednesday, January 26, 2005

Biztalk 2004 VB Samples

I did work quite a bit with C# and VB.Net with Biztalk 2004. I noticed that there are lot of samples in C# with the Biztalk 2004 SDK but a very few for VB.Net.

So I thought of posting some VB Samples which might be helpful. In a series of VB Samples posting, the first one is a sample VB Disassembler Pipeline component.

You can download it from here

Tuesday, January 25, 2005

Biztalk 2004 Map Testing Tool

In my current Biztalk 2004 solution, I have quite a bit of Biztalk maps with complex mapping. In my point of view testing each field mapping is crucial for defect free releases since it's very easy to miss a field while mapping thousands of fields. So Initially I used Biztalk mapper's "Test Map" feature, which is good, but was slow. I had to wait for some time till the map test is complete and get the results file to view. So as a techie I thought it would be very useful if I have a tool like I had in Biztalk 2000 for Testing maps. So I built one for testing Biztalk 2004 maps.

In Biztalk 2000\2002 world the map was a simple XML file, I had a sample VB Application which would dynamically pull the XSL based on a given map, the input file given, do the Transform and show the result in a Browser.


The difference between Biztalk 2000 tool and this is the complexity to attain this functionality. This tool uses Reflection to identify a Map class of a Biztalk assembly and dynamically gets the XSLT for a specified map and performs a Transform an xml file you specify. Although I'm not sure whether this will work for Mapper Shared Assemblies, it should work for all inline mappings.

Post a comment if anybody needs the source code, I'll send you.

Monday, January 24, 2005

Getting References of a Biztalk Assembly Programatically

I was a bit disappointed with the Deployment options shipped out of the Box with Biztalk 2004. Even though there a lot of tools like NAnt are avaiable, I prefer having a simple tool (Similar to Biztalk Explorer) which can spit out VBScript for all the selected assemblies with binding information, so to design the tool, I was doing some prototyping and wrote a recursive function to get all the BiztalkReferences of an assembly. All you need to do is pass in an Assembly Name and an empty ArrayList, in which the References Full Name would be filled in with.

You can download the code from here

Saturday, January 15, 2005

Biztalk 2000 to 2004 Map Scripting Functoid Migration Tool

The client I am currently working with heavily used Biztalk 2000 mapper for doing complex mapping. Most of the maps had about at least 300 scripting functoids and not migrating these maps automatically to BTS2004 was not an option.

I found a way to migrate the map 90% automatically except for the global initialization code which VB Script allowed in Biztalk 2000 maps.

I wrote a VisualStudio.Net macro which grabs all the VBScript Code and upgrades it to VB.Net and does a series of replacement (Like Len function in VBScript= Microsoft.VisualBasic.Len inVB.Net) of the most common VBScipt functions.

This tool provided a great value in the migration effort. Post a comment if you are interested, I can send the code.

Wednesday, January 12, 2005

Handling Error in Orchestration

The most fascinating part of Biztalk 2004 Orchestration compared to Biztalk 2000/2002 Xlang to me is Error Handling in Orchestration. In the recent implementation I was able to come up with a central Error handling mechanism.

All the actions in my orchestrations are wrapped under a common Scope with two Exceptional handlers

Orchestration

Scope
{
Step1
Step2
. . . }

Catch1 (System.Exception)
{
build Error message
Call Orchestration ErrorHandler
}
Catch2 (General Exception)
{ build Error message
Call Orchestration ErrorHandler
}

The important thing to note above is you should use System.Exception and not System.SystemException as the Catch Error object (Which is a common mistake)

Monday, January 10, 2005

Promoted Properties in Included or Imported schemas

I was playing with Schema Includes and Imports and it so helpful and awesome compared to the XDR schemas existed in Biztalk 2000/2002.

I found one interesting point while working on schemas. If you include a schema which had promoted properties, the properties does not get promoted automatically, you have to re-promote the same properties again in the included schema.

Sunday, January 09, 2005

Bug in Orchestration Filter?

Currently I'm architecting a EDI X12 Biztalk 2004 Implementation. Yesterday I got stuck with a issue which I'm still not sure whether I'm missing something or it's bug in Biztalk. I'll explain the issue below.

I have a Biztalk assembly which holds all the common schemas named Common.Schemas.dll and promoted two properties(SOURCE_ID & DEST_ID) in this schema in a Property schema named propertyschema.xsd

I also have a EDI partner based schema named sch_EDI_872.xsd in an assembly named EDI.Schemas.dll. which references the Common.Schemas.dll and assigns two fields (SOURCE_ID & DEST_ID) to the property schema Common.Schemas.propertyschema.xsd.

In an orchestration if I receive an incoming file with schema type sch_EDI_872.xsd, I could not see the SOURCE_ID & DEST_ID promoted properties in the filter expression.

Has anybody seen this happening?

Thursday, January 06, 2005

Viewing Biztalk 2004 Orchestration Pseudo C# Code

Biztalk 2004 Orchestration is nothing but an XML file with Pseudo C# Code in it. I'm really comfortable in seeing the C# code to see what's going on behind the scenes. I found really an easy way to see the code without going back and forth with various editors.

To see the C# code in the same Visual Studio IDE do the following

1. Open your Biztalk project which contains the Orchestration
2. Close all the files in the solution
3. Declare a variable in the Orchestration which is not used (If you have already one, its' fine. This is just to produce a warning while building)
4. Build the Biztalk project
5. See the Output Tab, you will get warning for the variable which is initialized but not used
6. Double click on that warning

Here we go, this will show the Pseudo C# Orchestration Code

Wednesday, January 05, 2005

What's with btproj.user file?

Have you ever seen a .btproj.user file being created with your
Biztalk project. Looks like this is a xml file which contains the user
specific information like References path, test file names,
ConfigurationDatabase name etc. So you might ask what's interesting about
this file?

The interesting thing is, Imagine you develop a Biztalk project on Machine1
with a local SQL Installation and it's now copied to your buddy's machine
Machine2 If your buddy does deploy by right clicking on the btproject, the biztalk
assembly will be deployed to your machine, provided your buddy has access to
your SQL Server.


Now you see where I'm going...I have spent countless hours
till I found this.

In my point of view a file named with extension btproj.user should never be
checked in into your Code Repositories (Like Visual SourceSafe, StarTeam
etc.) if your code might be shared.

My First Post

Well I'm a Biztalk Developer working on Biztalk, C# pretty much most of microsoft technologies.

I wanted to enter the blogger world for a long time but did not do that (You know why! Yes lazy...)

So my new year resolution this year was to start blogging my development experiences with a thought "might be useful to someone, somewhere".


I'll be blogging about Biztalk 2004 since I'm architecting quite a bit of Biztalk solutions recently. Thanks for stopping by!