Saturday, January 3, 2009

BizTalk 2009 Beta - Where's my HAT?

The Health and Activity Tracking tool, otherwise known as HAT is no longer available in BizTalk 2009. Well at least not in its current Beta form. The HAT tool allowed BizTalk developers/admins the ability to view BizTalk's "processing logs". You could see when a message was received, when it was processed by an orchestration (if applicable) and when the message was sent to a downstream system.

You also had the ability to customize the default queries and save them if you wished. Provided you had message body tracking enabled, you could also save the message bodies and message context from HAT.

At least for now, you willl no longer see the HAT shortcut in your Windows Start Menu. I assume that the change is permanent but since this is beta you never know.



The HAT executable (BTSHatApp.exe) still exists in your BizTalk install folder (x:\Program Files\Microsoft BizTalk Server 2009), however you cannot launch it as it will provide an error.

Harold Hoffman was able to get the tool to launch from the command line by providing the right parameters but the tool itself doesn't really allow you to do much with it.

So with the disppearance of HAT, have we been hung out to dry? The simple answer is No! The HAT functionality that we have all grown to love and hate can now be found in the BizTalk Admin console. This functionality can be found from the Group Hub Overview page. To create a new Query click on the "New Query" tab.

Note: For the following images right mouse - > Open Link in New Window for a larger image


You can narrow your search by specifying the types of BizTalk Service instances that you are interested in. For instance if you were only interested in Suspended Services instance you could select this value from the "Value" drop - down.


If you are interested in finding a message that was previously received or sent then selecting "Tracked Message Events" from the drop - down would be a good choice. From here you can also save the message body, if message body tracking was enabled, by right mouse clicking on a result and selecting "Save to File".

If you want to further constrain your results, you can add criteria to your search. In my scenario I have added "Schema Name" to the "Field Name" column. When you click on the "Value" drop - down you will see a list of deployed schemas to select.

Dealing with adding dates into your HAT query was always a pain; you had to account for you local timezone when constructing your query. This either meant using the DateAdd function or manually doing the timezone calculation in your head. Nice to see that they have made this process smoother.

A calendar control is included which makes date restriction much easier than in the HAT custom query window.

As you can see in the image below, that I didn't have to make any accommodations for GMT and local timezones.


If you were looking for more than just messages (say an orchestration) you could do a search for "Tracked Service Instances". You can further restrict your results by including additional criteria from the "Field Name" drop - down. For instance if you could restrict your results to a particular BizTalk Host.

Within the BizTalk Admin Console, the product team has included some convenience features like the calendar control and pre-populating drop - down controls. I did notice an inconsistency between the Host Name drop downs when performing searches against "All In-Process Service Instances" and "Tracked Service Instances".

As you can see BizTalkServerApplication and BizTalkServerIsolatedHost have been pre-populated when performing searches for "All In-Process Service Instances".




In the case of "Tracked Service Instances" the Host Names are not pre-populated. When I did insert the name of my Host and clicked the "Run Query" button it did return my desired result. I am not sure if this is a bug or design decision but remember...its Beta. I have submitted this to the Microsoft Connect site and we will see what happens with it.



Conclusion
Moving the HAT functionality into the BizTalk Admin console was definitely the right decision. Having to use 2 different tools from BizTalk 2006 onward was a bit of a pain. The BizTalk Admin console was a HUGE step forward from BizTalk 2004 so to have all of this functionality in one tool is great. After using HAT for almost 5 years, it will take a little getting use to but I am looking forward to using the BizTalk Admin console for all of my historical tracking needs.

5 comments:

Arminder said...

Nice article. I went to a seminar about BizTalk and they mentioned that HAT was incorporated into the Admin console. I only have a little knowledge of HAT, but I haven't really found it useful. I try to query various things and it stops responding, or times out. So I don't bother with it. It sometimes is just quicker to use SQL queries on the databases, but then you need to link so many together. Should I persevere with HAT, I mean how useful is it?

Oh BTW I use BizTalk 2006

Kent Weare said...

HAT is not perfect, but for the most part it will get you the results that you are looking for after enough digging. If your queries are taking a long time I would make sure your DTA Archive and Purge job (SQL Agent) is running. If you try to bring back your most recent 100 instances you should never time out.

In order to get the most out of HAT I would suggest the message viewer plug-in for HAT. It greatly enhances the end user experience of HAT. I have blogged about it here:
http://kentweare.blogspot.com/2009/01/biztalk-2006-message-viewer-hat-plugin.html

Army said...

Thanks for the reply Kent and the suggestions. I will double check the DTA SQL job. I'm sure its running, but I've had problems with the server guys disabling jobs when they shouldn't.

I will also have a read of the other article and try the DLL if I'm allowed to install it!

Thanks again.

harry said...

Very nice article Kent. I have used HAT in 2K6 for debugging the orchestration, which was a tricky shot for me atleast. How can we debug the same in BTS 2K9? How can we find out the Message Type if not using orchestration.

Plz help. Thanx

Regards,
harry

Maria said...

Nice article. I went to a seminar about BizTalk and they mentioned that HAT was incorporated into the Admin console only. I have zoot suit products if you are interested just simple drop a click.