a trace of thought on...BizTalk Server, Team Foundation Server, Windows Mobile, etc. RSS 2.0
 Friday, May 23, 2008

My article on “smart” use of XSLT within BizTalk appeared in BizTalk Hotrod Issue 4.  Once again, a great set of content thoughout this issue.

The article talks about the “why and how” of using a “straight” XSLT approach with BizTalk – where your XSLT files reside directly on disk, and not within map assemblies.  It discusses caching compiled XSLTs, and using XSLT 2.0 via the Saxon libraries.  You can download the sample code and comment over on the article’s Codeplex project.

Friday, May 23, 2008 8:15:37 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights
 Sunday, May 04, 2008

There has to be a better way to do this – if you know of one, kindly post a comment.

Until then, here is a technique that will allow you to ensure that if a stored procedure that BizTalk is calling is unable to complete its work successfully, you can rollback the work and be notified of that fact within your orchestration.

  1. In the stored procedure, use RAISERROR with a severity greater than 10 in the event of an error.  This should abort the (DTC) transaction that the BizTalk Sql Adapter initiated (that wraps the work within the stored procedure.)
  2. Use a scope around the Send/Recieve shapes in your orchestration that deal with this stored procedure.  You will want to catch Microsoft.XLANGs.Core.XlangSoapException…but you can’t.  The designer won’t let you.  So…be brave, open the ODX, and look for the catch block so you can modify it as shown below (see “ExceptionType”):
  3. <om:Element Type="Catch" OID="e7590870…" ParentLink="Scope_Catch" …>
    <om:Property Name="ExceptionName" Value="soapex" />
    <om:Property Name="ExceptionType" Value="Microsoft.XLANGs.Core.XlangSoapException" />
    <om:Property Name="IsFaultMessage" Value="False" />
    <om:Property Name="ReportToAnalyst" Value="True" />
    <om:Property Name="Name" Value="CatchException_2" />
    <om:Property Name="Signal" Value="True" />
    </om:Element>
  4. With this solution, you will wind up with the message you are sending to the stored procedure in a suspended state whenever the RAISEERROR occurs.  This isn't a huge deal, but you have to plan how these will get cleaned up.  It could be done manually, with a script, or with an orchestration or send port that subscribes to these suspended messages (try a filter with ErrorReport.FailureCode == 0xc0c0167a to get started, though you probably want to be more specific.)

After you’ve gone to these lengths, it is always worth considering whether you want to have your orchestration call a component so you are a little closer to the action.  But, if you have need of the adapter, this should work out.

Sunday, May 04, 2008 8:04:59 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights
 Wednesday, April 23, 2008

BizTalk 2006 R3 was announced today!  This answers the frequently recurring question of “When will BizTalk live inside of Visual Studio 2008?”

Well, this release will make that happen…In addition, R3 will provide support for Windows Server 2008 and Sql Server 2008.  You can expect a release after general availability of Sql Server 2008…

Like R2, this is a pretty incremental release.  Steven Martin indicates that releasing fresh bits is a better user experience than a “large Service Pack”…well, at any rate, it always seems like a good idea to avoid delivering new features in a service pack.  Expected to see some new (and updated) LOB, legacy, and database adapters – in addition to a mobile RFID piece…

Wednesday, April 23, 2008 7:42:55 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights
 Friday, March 21, 2008

Have you been getting an intermittent error similar to the following during a TFS Team Build execution (within the CoreGet target) ?:

Access to the path 'C:\Documents and Settings\tfsbuild\Local Settings\Temp\TFSTemp\4580{#$@;._}808' is denied.

If you look around, you will find a few folks who point at antivirus software as the culprit, but in our case it turned out to be the disk defragmentation service…

 

Friday, March 21, 2008 10:15:52 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Team System
I sat down with Jeff Brand from Microsoft to discuss “BizTalk for .NET developers”.  We touched on how BizTalk fits in with a typical SOA effort, dealing with the learning curve, typical usage scenarios, and several other topics.  Great fun.  You can grab the MP3 here if you like.
Friday, March 21, 2008 10:07:02 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights
 Monday, March 17, 2008

I still can’t quite believe we dared to wade into this topic – but Jeff Brand (Microsoft) hosted myself, Rocky Lhotka, Matt Milner, and Jason Bock for a podcast that hit on REST, web services, tooling, and a few other loosely connected topics.  It was fun to do.  I must have been sitting closer to the microphone – I’m the loud voice, for better or for worse.

Find it here.

Monday, March 17, 2008 9:12:29 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Architecture
 Friday, March 14, 2008

This bit of documentation explains that when you want to send a message out over the MQSeries adapter and receive a correlated response, the typical pattern is to:

  1. Generate a value for the MQMD_MsgID property on the outbound message
  2. Set the MQMD_CorrelID property on the outbound message to that same generated value, so that your “Send” shape can initialize a correlation that refers to the same property that will be present on the message you receive.
  3. Send the message (initialize correlation with MQMD_CorrelID)
  4. Receive the response (follow correlation with MQMD_CorrelID)

This assume that the destination system is following the usual pattern of setting the correlation identifier on the reply message equal to the message identifier on the request message.

Great.  Except when you don’t have the luxury of specifying the MQMD_CorrelID message on the outbound message to a value of your liking.  This occurs when you’re using a CICS bridge, or anything else that requires you to set the MQMD_CorrelID property to IBM.WMQ.MQC.MQCI_NEW_SESSION (signifying a new session interaction…)

In this case…you might be attempted to use the other pattern suggested here.  In this case, you engage in a solicit-response interaction with the adapter – where you send your request message and receive an immediate reply that contains a message with BizTalk_CorrelationID populated as a context property.  The message ID has also been generated for you.  You are then supposed to do a “dummy send” to initialize a correlation based on the BizTalk_CorrelationID property (sigh), and then follow that correlation with another receive shape that is the actual transaction response. 

To see this in action, see SDK\Samples\AdaptersUsage\MQSeriesAdapter\MQSCorrelationSetOrchestration under your BizTalk installation, or see the orchestration here.

Unfortunately, this design lends itself to a race condition.  The response coming back can occur prior to your correlation being initialized by the “dummy send”, resulting in a routing failure.  (This isn’t hypothetical – I just spent some time helping someone debug this issue.)

To work around this, you could try to do content-level correlation instead (i.e. use a promoted property in your request and response content.)

Friday, March 14, 2008 2:25:07 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights
 Tuesday, March 11, 2008

Wayyyy back in November of 2006, I wrote about a bug in BizTalk 2006:

This bug is encountered when you attempt to start a BizTalk 2006 application definition with orchestrations that have been bound to different hosts.  (Say, OrchA in HostA, and OrchB in HostB.)  After the application has been deployed, the first time the application is started (and 'orchestration start/enlist' is included in the start options) you will receive an error that looks something like this:

Microsoft.BizTalk.ExplorerOM.BtsException: Could not enlist orchestration 'BizTalkSample.Orchestrations.Echo,BizTalkSample.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=05a4a8d4071035d9'. Could not enlist orchestration 'BizTalkSample.Orchestrations.Echo,BizTalkSample.Orchestrations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=05a4a8d4071035d9'. Value does not fall within the expected range.

There was a fix for this bug  back at that time, but somehow it crept back in (even in R2.)  The KB number for the problem is the same, however (KB927052) and a fix is available.

Tuesday, March 11, 2008 2:07:28 PM (Central Standard Time, UTC-06:00)  #    Comments [1] -
BizTalk Insights
 Wednesday, February 27, 2008

Minor update to the BizTalk naming conventions here.  The big thing is that for a long while now I’ve thought physical send/receive ports should be named with just a plainly-worded phrase that will be as transparent as possible to operations staff.  (Whereas, back in the days of BizTalk 2004, you wanted something brief enough to fit in a HAT column…)

Wednesday, February 27, 2008 4:55:46 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights
Archive
<May 2008>
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567
About the author:

Scott Colestock lives, writes, and works as an independent consultant in the Twin Cities (Minneapolis, Minnesota) area.

© Copyright 2009
Scott Colestock
Sign In
All Content © 2009, Scott Colestock
DasBlog theme 'Business' created by Christoph De Baene (delarou)