Biztalk 2004 Integration Experiences

Friday, May 20, 2005

Biztalk Server 2006 aka Path Finder Documentations

Scott Woodgate has started posting some early on information on the next version of Biztalk Server "Pathfinder" (Biztalk Server 2006). You can get it from the BiztalkServerstuff msn group. (you need to be a member of the group to download documents)

Setup & Migration document

Adapter Enhancements

Also I heard from some reliable sources that Biztalk 2006 private beta would be available after the first week of June.

I'm excited to get my hands dirty with the new version and post the interesting things I find.

Wednesday, May 11, 2005

Cool un-documented HAT Feature

Looks like HAT could be invoked from a command line and it accepts one parameter, the path of the query file (.trq) for HAT to execute.

Most of the time I open HAT manually and use the "Most recent 100 service instances" Query, for trouble shooting, not anymore.

I created a batch file like this one below

"C:\Program Files\Microsoft BizTalk Server 2004\BTSHatApp.exe" "C:\Program Files\Microsoft BizTalk Server 2004\Tracking\Queries\100MostRecentServices.trq"

and integrated it with Visual Studio Tools menu, so I can get to HAT quickly :)

Friday, May 06, 2005

Per-instance pipeline configuration

I was reading the Biztalk Documentation and came across a interesting piece of functionality in Pipelines, which I had not used so far.

You might very well know that you can stick custom pipelines in Receive Locations or Send Ports, what is new is you can override the public properties set for the pipeline in Designer in each of the Receive location or send port i.e) you can make the pipeline work differently per each instance. Check it out here

To me it sounds great, several projects I have seen so far had Receive/Send pipelines duplicating similar kind of tasks, for ex. I had two receive pipelines for two different partners with Flat file Disassembler
Flat file Disassembler1

Document Schema : docschema1
Header Schema : headerschema1
Trailer Schema : trailerschema1

Flat file Disassembler2

Document Schema : docschema2
Header Schema : headerschema2
Trailer Schema : trailerschema2

Essentially the two pipelines above just had the public properties different in the flat file dis-assemblers, but needs two different pipelines to do the job. Instead now I can have one pipeline and override the public properties in each of the receive locations.

Sounds good? Yes, but to make this work you cannot use the Biztalk Explorer GUI instead you might have to use the Biztalk Explorer OM by code to tweak it. See the following Code for setting the xml file in a receive location

BtsCatalogExplorer objCatalog = new BtsCatalogExplorer();
objCatalog.ConnectionString = "Server=" + YOURMGMTDBSERVERNAME +
";Initial Catalog=" + YOURMGMTDBNAME
+ ";Integrated Security=SSPI;";

foreach(ReceivePort objreceivePort in objCatalog.ReceivePorts)
foreach(ReceiveLocation objlocation in objreceivePort.ReceiveLocations)
if(objlocation.Name.ToUpper() == YourReceiveLocationName.ToUpper())
objlocation.ReceivePipelineData = YOURXMLSTRINGDATA;


Tuesday, May 03, 2005

Biztalk Xml Disassembler Bug?

Recently when helping out my colleague with a biztalk project and I noticed an issue with the Biztalk Xml Disassembler, which appears to be a bug to me.

The requirement was simple. It's to receive a message, remove the envelope from the message and pass it to an Orchestration. I created a prototype to illustrate this, The Biztalk project had a receive pipeline in which there was a Xml Disassembler in the Disassemble stage. I had selected an envelope schema and a few document schemas.

When I tested the solution I got an error like below

There was a failure executing the receive pipeline: "TestProject1.ReceivePipeline1" Source: "Microsoft.BizTalk.Pipeline.Components" Receive Location: "C:\TestPipeline\In\*.xml" Reason: Index was outside the bounds of the array.

After hours of troubleshooting I found that the reason was some of the document schemas specified in the property designer did not have namespace and one of them had a namespace, like below

"Schema1" - namespace ""
"Schema2" - namespace "
"Schema3" - namespace ""

Looks like if you mix and match schemas with/without namespaces, the Xml Disassembler does not work.

Temporary fix was to remove the namespace from "Schema2" and it worked. Hope this would be fixed in the next Service pack.