Click here to Skip to main content
6,629,885 members and growing! (21,044 online)
Email Password   helpLost your password?
Enterprise Systems » Microsoft BizTalk Server » General     Intermediate License: The Code Project Open License (CPOL)

Displaying Messages and Its Flow from BizTalk Message Tracking Databases

By tiwarivishnu

This document details the use of BAM APIs and message tracking databases used to display the message and its flow.
All Topics, Dev
Version:3 (See All)
Posted:5 Feb 2009
Views:3,301
Bookmarked:4 times
Unedited contribution
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
2 votes for this article.
Popularity: 1.30 Rating: 4.33 out of 5

1

2
1 vote, 50.0%
3

4
1 vote, 50.0%
5

Introduction

Sometimes, in BizTalk development, a developer needs to develop an out of the box solution for message tracking, etc. Even though the BizTalk Server itself provides an excellent tool such as BAM for Business Analyst (precise to say) and HAT for developer. We encountered the same kind of problem where client wanted us to develop such kind of custom solution to display the message body and message flow.

Background

This document details the use of BAM APIs and message tracking databases used to display the message and its flow. It also details about the message needs to tracked in the Tracking database. Since last year I am trying to write this article which will guide you about the tracking of messages in the BizTalk Tracking databases and how exactly we used this to create a system which displays the message flow through the end points. I would be dividing this learning basically in three parts

Enabling Tracking on BizTalk Send and Receive Ports in BizTalk Administration Tool

Developers has to make sure that Tracking has been turned on the Send and Receive ports. This step is done to track the messages and as a result of the this message is inserted in the Tracking Database along with their instance id and activity ids.

Enabling Tracking on the Receive Port

Go To BizTalk Server Administration --> Receive Ports Properties ---> Tracking

Check the options Track Message Bodies and Track Message Properties

Enabling Tracking on the Send Port

Go To BizTalk Server Administration --> Send Ports Properties ---> Tracking

Check the options Track Message Bodies and Track Message Properties.

Database Tables Involved

The developer must also needs to be aware of the tables involved. I would just like to tell about the below two tables who stores the data related to message flow and message body.

The dta_ServiceInstances, Tracking_Parts1 and Tracking_Parts2 tables

BizTalk Server Micorsoft.BizTalk.Operations class and their methods

When I worked with the BizTalk Server 2002, the messages were track based on the Interchange Id but in the Biztalk server 2004 and onwards the database model of the BizTalk Databases has been totally chaged.The BAM APIs helps you a lot to track these messages. Below are the few APIs which will help you to do the same. You need to use Microsoft.BizTalk.Operations class which has below methods to get the routing details, message flow details etc. This DLL is placed in C:\\Program Files \ BizTalk Server 2006.

  • GetMessage
  • GetMessageFlow
  • GetRotingDetails
  • GetServiceInstance
  • GetTrackedMessage

Apart from this also has few very important methods but they are not of our use in this context.

  • ResumeInstance
  • SuspendInstance
  • TerminateInstance

This DLL could be located as below, in case if you need to develop and out of the Box application you must have the License for the same. Below is the look of this DLL in ILDASM. This is an cool tool provided with Visual Studio which allows you to look at the methods, properties, metadata etc. of the class.

In order to track the message the you need to enable to tracking of the message only then it will go to the tracking database. Other thing is you should be aware of the database structure of the BizTalk Tracking database. Below is the look at the tracking databases. The database name is BizTalkDTADB and the TrackingParts1 and TrackingParts2. Apart from this there are two tables which a developer must look into while developing such kind of solutions.

Summary

Now you have all the high level information, so please go ahead with the development and ping me if any more information is needed.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

tiwarivishnu


Member

Occupation: Architect
Company: XXXX
Location: United States United States

Other popular Microsoft BizTalk Server articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
  (Refresh) 
-- There are no messages in this forum --

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 5 Feb 2009
Editor: Deeksha Shenoy
Copyright 2009 by tiwarivishnu
Everything else Copyright © CodeProject, 1999-2009
Web18 | Advertise on the Code Project