Charlie Mott

  Home  |   Contact  |   Syndication    |   Login
  20 Posts | 0 Stories | 17 Comments | 0 Trackbacks

News

View Charlie Mott's profile on LinkedIn



Archives

Post Categories

Sunday, March 14, 2010 #

Article Source: http://geekswithblogs.net/charliemott

This article describes an approach to the management of cross reference data for BizTalk.  Some articles about the BizTalk Cross Referencing features can be found here:

Options

Current options to managing this data include:

However, there are the following issues with the above options:

  • The 'BizTalk Cross Referencing Tool' requires a separate database to manage.  The 'XRef XML Creation' tool has no means of persisting the data.
  • The 'BizTalk Cross Referencing tool' generates integers in the common id field. I prefer to use a string (e.g. acme.petshop.country.uk). This is more readable. (see naming conventions below).
  • Both UI tools continue to use BTSXRefImport.exe.  This utility replaces all xref data. This can be a problem in continuous integration environments that support multiple target BizTalk groups (even different clients).  If you upload the data for one client/group/application it would destroy the data for every other application in that group.  Yet in TFS, where builds run concurrently, this could break unit tests.

Alternative Approach

In response to these issues, I instead use simple SQL scripts to directly populate the BizTalkMgmtDb xref tables combined with a data namepacing strategy to isolate client\application data.

Naming Conventions

All data keys use namespace prefixing.  The pattern will be <company name>.<biztalk group and\or applicatoin>.<data type>.  The data must follow this pattern to isolate it from other company\group cross-reference data.  The naming convention I use is lower casing for all items. 

The table below shows some sample data.  (Note: this data uses the 'ID' cross-reference tables.  The same principles apply for the 'value' cross-referencing tables).

Table.Field Description Sample Data
xref_AppType.appType Application Types acme.petshop.erp
acme.petshop.portal
acme.petshop.assetmanagement
acme.petshop.ordermanagement
xref_AppInstance.appInstance Application Instances
(each will have a corresponding application type).
acme.petshop.dynamics.ax
acme.petshop.dynamics.crm
acme.petshop.sharepoint
acme.petshop.maximo
acme.petshop.oms
xref_IDXRef.idXRef Holds the cross reference data types. acme.petshop.vatcode
acme.petshop.country
xref_IDXRefData.CommonID Holds each cross reference type value used by the canonical schemas. acme.petshop.vatcode.exmpt
acme.petshop.vatcode.std
acme.petshop.country.usa
acme.petshop.country.uk
xref_IDXRefData.AppID This holds the value for each application instance and each xref type. UK
GB
44

Scripts

The data to be stored in the BizTalkMgmtDb xref tables will be managed by SQL scripts stored in a database project in the visual studio solution.

File(s) Description
Build.cmd A sqlcmd script to deploy data by running the SQL scripts below. (This can be run as part of the MSBuild process).
acme.petshop.purgexref.sql SQL script to clear acme.petshop.* data from the xref tables.  As such, this will not impact data for any other client/group.
acme.petshop.applicationInstances.sql   SQL script to insert application type and application instance data.
acme.petshop.vatcode.sql
acme.petshop.country.sql
etc ... 
There will be a separate SQL script to insert each cross-reference data type and application specific values for these types.