Friday, December 22, 2006

BizTalk InvalidPropertyTypeException Followup

This is a follow-up post to BizTalk InvalidPropertyTypeException.

In order to get around receiving these exceptions in our environments, we added a post deployment SQL script that only enables tracking for those schema's and properties which are a part of our BizTalk project and don't actually belong to a BizTalk property schema.



SQL Script to Enable Tracking by Assembly

SET NOCOUNT ON

DECLARE @CLRNamespace VARCHAR(50);
DECLARE @AssemblyId int;

SET @CLRNamespace = 'SupplyChain.BizTalk.Schemas';

SET @AssemblyId = (SELECT TOP 1 assemblyid from [BizTalkMgmtDb].[dbo].[bt_documentspec] where clr_namespace = '' + @CLRNamespace + '')

BEGIN TRAN

UPDATE [BizTalkMgmtDb].[dbo].[bt_documentspec]
SET is_tracked = 1
WHERE clr_namespace = '' + @CLRNamespace + ''
AND is_property_schema = 0

UPDATE [BizTalkMgmtDb].[dbo].[bt_properties]
SET is_tracked = 1
WHERE nassemblyid = @AssemblyId

COMMIT TRAN

I heard back from Lee Graber that the behavior described does appear to be an issue in BizTalk 2004, but he is unable to reproduce under BizTalk 2006. Since the impact is relatively low, and there is a workaround available, the likelyhood of any fix making it into BizTalk 2004 is very small.

No comments:

Post a Comment