Visual Studio 2005 added support for Debugger Visualizers. With debugger visualizers, developers can define what information (and in what form) is shown in the debugger for a specific type. There are many visualizers for various .NET types floating around. Here is a small list of the most popular ones: ASP.NET Cache, Regular Expression, XmlDocument (and other Xml related types), a powerful looking DataSet visualizer and there is even a WindowsIdentity visualizer.
I am not going to explain in details how to write your own visualizer. You can find step by step instructions on MSDN. Most existing debugger visualizers I mentionned in the previous paragraph also have home pages where you will find details on how to write your own or even source code.
I'd like to share some tricks you might find useful when writing your own visualizers:
- You can write visualizers for public (obvious!) or internal or private types. The trick for non public types is to use the Assembly Qualified Name of the type you want to visualize. For instance, BizTalk 2006's MessageContext property is actually an internal type (see purple type name below):
DebuggerVisualizer(typeof(<type of visualizer> ), typeof(<type of visualizer source>), TargetTypeName = "Microsoft.BizTalk.Message.Interop.MessageContext_ManagedViewOfNative, Microsoft.BizTalk.Pipeline, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35", Description = "<description>")]
- Your visualizer code runs non JIT'ed. So make sure you do not perform too much work or it will be slow. If you do too much, the expression evaluator will time out and interrupt your visualizer with an "Expression Evaluation timed out exception".
- Use DataGrid instead of DataGridView. I know I used a DataGridView in my visualizer, but the DataGrid is faster, especially when running non JIT'ed.
To illustrate these points, I wrote a BizTalk 2006 MessageContext debugger visualiser. You can download the complete solution BTSVisualizers.zip below. It works with Visual Studio 2005 and BizTalk 2006 only.
Load the visualizer solution in Visual Studio and build the release comfiguration.To install the MessageContext visualizer, shut down all instances of Visual Studio and copy BTSVisualizers.dll to %VS8ROOT%\Common7\Packages\Debugger\Visualizers. (If you installed Visual Studio at the default location, that would be C:\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger\Visualizers) That's it!
The next time you debug a pipeline (by attaching to BTSNTSVC.exe), you can hover the mouse on the "Context" variable of the message and see all entries in the message context:
Unfortunately, this visualizer will not display anything useful unless you are debugging a BizTalk artifact by attaching to BTSNTSVC.exe. This is because most debugging tools (like pipeline.exe) do not populate the message context.
In a previous post, I described the home page of the new BAM Portal. Today, let's take a look at the Instance Search feature. The instance search allows you to search BAM data for a particular activity instance:
You can add / remove clauses using the "Add" / "Remove" buttons. You can also build a query and save it locally as an XML file for future use. Opening a query is done by clicking the "Open" button. Let take the Search for a test drive, shall we?
After selecting the business data you would like to see in the column chooser, I am looking for all purchase orders with an amount of $500. There is only one purchase order matching in my system. I can see the details of this activity by clickin on the row of interest:
Users can see all business data associated with this activity instance. Milestones appear sorted from the oldest one to the newest one. Any related document or related activity would appear in their respective sections.
Finally, the "Technical Assistance" can be used to open a technical assistance ticket. The subject / description entered below will be posted to the event log of the server, along with references to engine artifacts (messages / orchestrations) related to this activity.
Tomorow, I'll show how one can view aggregated data and create alerts when specific condition happen.
You probably already read Scott's document on what is new in Business Activity Monitoring 2006.Today, I'll shed some light on the brand new "out of the box" portal. All information are based on the CTP build you might have picked up at TechEd 2005. Keep in mind that the BAM Portal may (and probably will) change before its final version is released.
There are three main zones:
the header. This is the location users can customize for branding purposes,
the navigation bar (on the left on a light blue background) which displays all views and activities. This is the entry point to most features of the portal,
the content where users will interact with data. The main page displays a quick summary of importan BAM concepts.
The header displays branding information (which can be customized for your company), the contextual help link and the current location. On the screenshot below, I am on the Home page. You can always come back to the home page by clicking on the "Home" icon at the left of the header.
The navigation bar:
The navigation bar displays all views / activities which can be accessed by the current user. On the picture below, I have access to one view (SalesManagerView) under which there is currently one activity ("PurchaseOrder").
I can search for instances of activity "PurchaseOrder" by clicking on "PurchaseOrder" under "Activity Search". I can view aggregated data by clicking on one of the entries under "Aggregations". Finally, I can manage alerts by clicking on "PurchaseOrder" under the "Alert Manager" node. The navigation bar is the main entry point to most BAM Portal features. It will always be displayed on the left of the window.
Join me tomorow as I explore the Activity Search, Aggregations and the Alert Manager.
Make sure you pick up a copy of BizTalk Server 2006 CTP (Community Technology Preview). Starting next week, I will start a serie of deep dive posts on some of the new BAM (Business Activity Monitoring) features ... Staty tuned!
BizTalk Server 2004 Service Pack 1 was released today. You can download it at http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=f4a5ab9e-d599-4cc8-abdf-ae6ae68bac3d.
Since Virtual Server has been released, I got asked the question several times so I figured I'd put the answer here where everybody can find it. Knowledge Base Article 842301 says something like:
Current released versions of BizTalk (2000, 2002 ,2004) in any flavor (Enterprise, Developer ...) are "best effort support" on virtual machines (Virtual PC and Virtual Server). Any case opened with Microsoft Support will be supported on a best effort basis and you may be asked to reproduce the problem on physical hardware during the course of troubleshooting the issue.
Not supported does not mean that it will not run: it may very well run fine or you may run into subtle issues. Not long ago a Microsoft Technology Specialist attempted to run BizTalk on a three weeks development project. According to him, this is not worth wasting the effort again. They ran into issues and none of them reproduced on real hardware. I am sure we can find individuals who have been running BizTalk on Virtual PC / Virtual Server without any problem so far. It probably depends on what you are doing.
If you feel lucky and want to try it out by yourself, this thread (chosen among many others) discusses some tips that might help you. While running a BizTalk server on a virtual machine for development purposes might be fine, I would definitely advise against running a production server under a virtual machine.