.comment-link {margin-left:.6em;}

Ben Cops

Monday, June 21, 2004

Microsoft.BizTalk.CrossReferencing

The Microsoft.BizTalk.CrossReferencing.CrossReferencing class is available to use from expressions, and in the database functoids - it allows you to crossreference IDs and values between different systems. For example, you might be dealing with the same customer on 3 different systems - they all have their own ID for the customer and every time you need to work out what the CustomerID is for ExternalSystemX, you can use the CrossReferencing class and functoids to look it up for you.
The SDK documentation basically ends there (cheers) - but there's a bit more online now. The cross referencing database functoids use data from tables stored in the BizTalkMgmtDb SQL Server database, and you need to import your seed data (what systems there are, what IDs you want to track, etc) using a little command line job in the BTS2004 install directory (BTSXRefImport.exe). Otherwise you'll get errors like:
Unhandled Exception: Microsoft.BizTalk.CrossReferencing.RuntimeException: IDXRef <CustomerID> or AppInstance <OldSystem> is not registered.

The data model is modelled as
Applications->Application Instances->IDXrefs (the type of ID you want to persist - in this case the type is "CustomerID"). To set the CrossReferencing database up to use this you simply need to create a number of XML files to store this seed data, and then run the tool on it. Then you can write code like:
CrossReferencing.SetCommonID("CustomerID", "OldSystem_Production", "23", "5");
MessageBox.Show(CrossReferencing.GetAppID("CustomerID", "OldSystem_Production", "5"));


Should you so desire.
There doesn't seem to be any particularly useful way of removing or resetting this seed data (not that I can find anyway) - but the tables are simply all the tables in BizTalkMgmtDb that are prefixed xref_*

I'm not sure any of that was quicker than writing the logic one'self, but its nice having it in the functoids.
There appears to be a hotfix for the bit of the API they forgot to write:
FIX: You cannot remove an application ID after you create it by using a database functoid in BizTalk Server 2004
:)

27 Comments:

  • Is there any simple but complete sample projects around that help developers to get up speed in using BizTalk CrossReferencing?

    Has anyone developed a Web-GUI using the CrossReference class to maintain the lookups in runtime? Any samples on that?

    BR Sten Walde, Know IT, Stockholm, Sweden

    By Anonymous Anonymous, at 2:11 pm  

  • Z0NKqJ The best blog you have!

    By Anonymous Anonymous, at 12:42 pm  

  • n5zU3Q Good job!

    By Anonymous Anonymous, at 5:53 pm  

  • Nice Article.

    By Anonymous Anonymous, at 7:28 pm  

  • Good job!

    By Anonymous Anonymous, at 8:36 pm  

  • Nice Article.

    By Anonymous Anonymous, at 9:37 pm  

  • Nice Article.

    By Anonymous Anonymous, at 11:08 am  

  • Thanks to author.

    By Anonymous Anonymous, at 3:47 pm  

  • Thanks to author.

    By Anonymous Anonymous, at 4:53 pm  

  • actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

    By Anonymous Anonymous, at 5:45 pm  

  • Hello all!

    By Anonymous Anonymous, at 6:30 pm  

  • BRNewA write more, thanks.

    By Anonymous Anonymous, at 10:00 pm  

  • Hello all!

    By Anonymous Anonymous, at 4:07 am  

  • Thanks to author.

    By Anonymous Anonymous, at 4:41 am  

  • Nice Article.

    By Anonymous Anonymous, at 6:30 am  

  • Hello all!

    By Anonymous Anonymous, at 7:08 am  

  • actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

    By Anonymous Anonymous, at 7:39 am  

  • Please write anything else!

    By Anonymous Anonymous, at 8:05 am  

  • actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

    By Anonymous Anonymous, at 8:40 am  

  • Nice Article.

    By Anonymous Anonymous, at 9:09 am  

  • Wonderful blog.

    By Anonymous Anonymous, at 10:35 am  

  • Thanks to author.

    By Anonymous Anonymous, at 11:08 am  

  • Hello all!

    By Anonymous Anonymous, at 11:38 am  

  • When there's a will, I want to be in it.

    By Anonymous Anonymous, at 12:10 pm  

  • Good job!

    By Anonymous Anonymous, at 12:49 pm  

  • Save the whales, collect the whole set

    By Anonymous Anonymous, at 1:25 pm  

  • Beam me aboard, Scotty..... Sure. Will a 2x10 do?

    By Anonymous Anonymous, at 1:51 pm  

Post a Comment

<< Home