Update: this issue was addressed by Cumulative Update 6 for BizTalk Server 2010
Recently I was investigating an interesting problem in BizTalk Server 2010. All of the sudden events generated for receive locations just stopped being recorded. Noone has changed the configuration. For a simple messaging scenario, in which message flows from receive location A to a send port B, you could see the send port events being tracked. But no sign of when and where the message was received.
Further investigation proved that latest receive location events were recorded at 4 p.m. From 5 p.m. only send port events were recorded. ‘Something must have gone wrong, there must be an error logged’ I thought. But none of the servers in the farm had errors logged between 4 p.m. and 5 p.m. I was disappointed.
I asked my colleague if he knew what could be wrong with BizTalk Server 2010 with cumulative update 5 that it is not tracking events. He wrote back to me to check the tracking configuration of the pipelines as it could have been disabled during CU5 installation. Interestingly I checked PassThruReceive pipeline configuration. Event tracking was disabled. I enabled it and receive events were recorded again. But we installed CU5 a couple of months ago. So what the heck?
What could have happened between 4 p.m and 5 p.m.? Anything installed? Yes, a BizTalk application was installed at 5:35 p.m. I deleted the application, imported it again and PassThruReceive’s pipeline tracking configuration was gone again. Gotcha!
I started tedious tests of the package to find the reason of the problem. The application has no receive location or request-response send port that would use PassThruReceive pipeline. The only thing I have found out is: sometimes when application is deleted using BizTalk Administration Console, PassThruReceive pipeline tracking configuration disappears and my gut feeling tells me it’s a nasty bug.
So beware if you have a BizTalk MSI package with BizTalk assembly inside where you created some custom pipelines. Tracking may magically be disabled when you delete that application.
And this is not everything. When testing the package extensively, modifying it all the time, I have noticed that PassThruSend pipeline tracking can also be disabled. And the magic may happen not only when you delete an application, but also when you redeploy an existing one using the “overwrite” option.
Below you can find a scenario to reproduce the behaviour.
Refers to product
BizTalk Server 2010 Enterprise Edition (v 3.9.469.0) with CU5 [KB 2689458]LDR
Events raised on PassThruReceive pipeline were not recorded in BizTalk tracking database.
After redeployment of BizTalk application, tracking has been disabled on PassThruReceive pipeline. And PassThruReceive pipeline is not used by this application. It seems to be a bug in the BizTalk deployment tool.
After redeployment of BizTalk application, make sure PassThruReceive pipeline in “BizTalk.System” application is still tracking events.
Create the test package
I have stripped the original project a lot to leave out only components that matter.
(1) Create Visual Studio 2010 solution
- Create new empty BizTalk Server project named “TestTracking”
- In the project add new receive pipeline file named “ReceiveXml.btp”
- From BizTalk Pipeline Components toolbox drag “XML disassembler” component to disassemble stage of newly created receive pipeline
- In the project add new send pipeline file named “SendFlatFile.btp”
- From BizTalk Pipeline Components toolbox drag “Flat file assembler” component to assemble stage of newly created receive pipeline
- Using Visual Studio Command Prompt (2010) create new key file by executing command “sn -k C:\Tempproject_key.snk”
- Remove references to:
- In project properties on “Signing” tab, check “sign the assembly” box and choose the strong name key file “C:Tempproject_key.snk”
- In project properties on “Deployment” tab set “Application Name” to “TestTracking”
(2) Build and deploy the “TestTracking” project to a BizTalk Server
(3) In the BizTalk Server Administration Console open “TestTracking” application
- Create new one-way receive port named “TestTracking.Receive” and new receive location named identically
i. Set transport type of the receive location to “FILE” and configure its receive folder (it will not be used during tests though)
ii. Set receive pipeline of the receive location to “XMLReceive” [Microsoft.BizTalk.DefaultPipelines.XMLReceive…]
(4) Export “TestTracking” application’s binding to “TestTracking.Binding.TST.xml” file
(5) Add the “TestTracking.Binding.TST.xml” file as BizTalkBinding resource with target environment named “TST”
(6) Export the “TestTracking” application to TestTracking.mis file
- When exporting: on “Select Resources” tab uncheck “Bindings” and “Global Parties” check boxes
Steps to reproduce the behavior
This is NOT the ONLY scenario to see the tracking being disabled, but the only one so far I could reproduce. During the course of testing the issue I have also experienced PassThruTransmit’s pipeline tracking disabled, but couldn’t reproduce that.
(1) Delete “TestTracking” application using BizTalk Administration Console
(2) In “BizTalk.System” application make sure event tracking is set on Microsoft.BizTalk.DefaultPipelines.PassThruReceive pipeline
- “Port start and end events” must be checked
- “Message send and receive events” must be checked
(3) Import “TestTracking.msi” file using “TST” as target staging environment
(4) Make sure tracking is still set on Microsoft.BizTalk.DefaultPipelines.PassThruReceive pipeline
In “BizTalk.System” application
Step 5 may not be necessary
(5) Import “TestTracking.msi” application again
- On “Application Settings” tab select option to “Overwrite resources”
- On “Application Target Environment Settings” tab leave “<Default>” target staging environment
(6) Delete “TestTracking” application
(7) Check that tracking is disabled on Microsoft.BizTalk.DefaultPipelines.PassThruReceive pipeline