I’ve always advocated to other BizTalk Server developers not to use constants in BizTalk Server maps, but I could not present a valid argument.   At my current client, the existing BizTalk Server 2004 implementation makes heavy use of the SQL Server adapter.  Because of bad practices, the underlying stored procedures were renamed causing breaking changes to the XML schema files in the BizTalk Server implementation.  I made the appropriate changes, refreshed the maps, and reset missing links.


Upon testing the implementation in the test environment, the stored procedures were failing miserably due to missing required fields.  My investigation found that many of the maps set default values for some elements in the SQL Insert message using constants.  Upon refreshing the schema, the constants were lost.


To resolve the issue I viewed the old version of the BizTalk Server maps using TextPad or XmlSpy and culled out the constants from the Constants element.  I set the default values using either a String or Integer functoid.