Business Activity Monitoring (BAM) with BizTalk Server 2006 from Start to Finish
Published: 01 Jun 2006
Unedited - Community Contributed
In this article, Naveen demonstrates the working of Business Activity Monitoring in BizTalk Server 2006 using a Purchase Order Request scenario.
by Naveen Karamchetti
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 39736/ 69


This article describes the most vital feature of BizTalk Server 2006 known as BizTalk Activity Monitoring (BAM).  2006 has several improvements in the BAM area.

Business Activity Monitoring – what does it mean?

Microsoft documentation describes BAM as

“Business Activity Monitoring (BAM) is a collection of tools that allow you to manage aggregations, alerts, and profiles to monitor relevant business metrics (called Key Performance Indicators, or KPIs).  It gives you end-to-end visibility into your business processes, providing accurate information about the status and results of various operations, processes and transactions so you can address problem areas and resolve issues within your business.”

Role of BizTalk

The BizTalk Server 2006 has a component known as the “BAM Portal.”  The various BAM views can be observed and monitored using this BAM Portal.

Target Audience

This article uses BizTalk 2006 and Visual Studio 2005.  It is expected that readers of this article have considerable working experience in these products.

Purchase Order System

In this article we shall be considering a Purchase Order (PO) System.  A PO request is received by the receive location of the PO Orchestration.  A Purchase Order Acknowledgement is generated for every PO request and the PO status is set.  The status of this PO is set, based on upon certain conditions. The various states of the PO are listed below.

·         APPROVED

·         REJECTED

·         ON_HOLD

BizTalk Artifacts

This BizTalk solution consists of the following.

·         Schema – PORequest.xsd & POAck.xsd

·         Property Schema (For exposing the schema properties into an orchestration and ports)

·         Map – A PORequest is mapped into a POAck message.

·         Orchestration – ProcessPO.odx – Sends out a POAck message. (See Figure 2)


There are two schemas used in this application, a PORequest schema and a POAck schema.


A Map (PORequest-To-POAck-Map.btm) is used to transform a PORequest message to a POAck message.  See Figure 1.

Figure 1


An Orchestration is essentially a Business Process.  See Figure 2.

The “ProcessPO” Orchestration performs the following:

·         The Orchestration picks up the PO Request message from the receive location.

·         The PO message is transformed into a POAck message.  The status property is set to either APPROVED, REJECTED or ON_HOLD, based on the input values in the PO.  Refer to Figure 2.

·         If POAmount < $1000, then POStatus = “APPROVED.”

·         If POAmount > $ 5000 then POStatus = “REJECTED.”

·         Else POStaus = “ON_HOLD.”

These are fairly simple conditions in order to generate a BAM report.

Figure 2

Preparing the BAM Observation Model

Once the Orchestration is up and running, the data required for the BAM operation needs to be prepared.

The following sequence of steps describes the process of preparing the BAM Observation Model.

Step 1: Create a new XLS file from the “BAM.xla” template.  Locate the BAM.xla file in the following directory in your BizTalk installation, “C:\Program Files\Microsoft BizTalk Server 2006\ExcelDir.”  This shall be the BAM Observation Model.

Step 2: Click on the menu “BAM” and select the menu item “BAM Activity…”

Step 3: The BAM Activity Wizard opens up.  Click on the “New Activity…” button.  See Figure 3.

Figure 3

Specify the Activity name as “PurchaseOrderActivity.”  Add Items to this Activity by clicking the “New Item…” button.  As you might notice, there are several Item Types in an Activity.

 Item Type


Business Milestone

For example, the status of a purchase order request.

Business Data – Text

A string containing any alphanumeric characters.  For example, Ship to: City, State/Province and Zip/Postal code.

Business Data – Integer

A whole number value.  For example, the total number of items in the PO.

Business Data – Float

A decimal value.  For example, the total dollar amount of the PO.

In this example we have defined the various PO statuses as Milestones.

Finally, click on the “OK” button.

Step 4: The “BAM View Creation” wizard opens up (see Figure 4).

Specify the View Name as “POSummary” and select the Activity listed.  Click on the “Next >” button.

Figure 4

BAM View: A BAM View is the set of data you would like to monitor or expose to the various stakeholders of the application.

Step 5: Select the items needed to add to the View.  Choose the “Select all items” checkbox.  Finally, click the “Next >” button.  See Figure 5.

Figure 5

Step 6: Create “Aliases, Durations and Groups” as seen Figure 6.

Durations: Duration specifies the amount of time, defined by a beginning and ending milestone, for a particular activity item.  For example, the number of days a PO is valid.

Milestone Groups: Use a milestone group to put the related milestones together, for example the beginning and end milestones that define how long a Purchase Order is valid.  You can then use the milestone group as a single milestone.

Figure 6


Step 7: Create “Dimensions and Measures” as seen in Figure 7.

Measure: The measure is a single value which yields information relevant to process management.  For example, the “TotalPOAmount” measure computes the total value of the PO order.

Dimension: Dimensions are defined in terms of measures.  They put the measure into various perspectives.  For the “TotalPOAmount” measure, it can be made relevant to a PODate, PONum or POStatus by defining in the Pivot table.

Figure 7



Step 8: This is the “Excel Pivot table.”  Note the Dimensions and the Measures listed in the Pivot table field list as seen in Figure 8.

Figure 8

Step 9: Export the data in the XLS sheet.  Click on the menu “BAM” and select the menu item “Export XML…” and specify a file name “POActivityViewExport.xml.”  Then save it in the local directory.

Deploying the BAM observation model to generate the BAM infrastructure

The BAM observation model can be deployed using this simple command:

BM deploy-all -DefinitionFile:C:\BAMSolution\XlsFile\POActivityViewExport.xml.

NOTE: The file BM.exe is found at the following location.

“C:\Program Files\Microsoft BizTalk Server 2006\Tracking\”

Tracking Profile Editor (TPE)

The TPE is a tool that developers use to create or modify tracking profiles, between items in a BAM activity and the BizTalk solution sources for those items.  The TPE consists of a graphical user interface that allows developers to map a specific view of internal business processes, as well as associated data, to orchestrations and ports using drag and drop experience that does not require the developer to provide code.

The Tracking Profile Editor assumes that at least one BAM definition has already been deployed (using BM.exe).  The Tracking Profile Editor uses a registry key that is set during BizTalk configuration to determine where the Management database is located.

Figure 9

The Figure 9 shows the TP editor used to map the Activity milestones and data with the Orchestration and the message payloads.  Once the mapping is completed, the tracking profile needs to be applied (see Figure 10).  A message confirming the successful application of the profile gets displayed.  See Figure 11.




Figure 10

Figure 11

BAM Portal

The BAM portal in BizTalk Server 2006 provides real-time, end-to-end visibility into a business process.  The BAM portal allows you to perform searches, aggregate data, and set alerts on a BAM view, which is a perspective on your business data.  See Figure 12.

The PivotTable View area displays the PivotTable report that we designed using the BAM Add-In for Excel.

The Pivot table, which we have created in the previous section, would be displayed as shown in Figure 13.  The Chart view of the same pivot table is shown in Figure 14.

Figure 12

Figure 13

Figure 14



About the downloadable code

Unzip the BizTalk project zip file with the folder names in the C:\ drive.  Use the Bindings file to setup the ports.  Edit the BizTalk project in Visual Studio 2005 and update the Sharepoint connection strings.

The BAM Observation Model is located in the file “C:\BAMSolution\XlsFile\ POActivityView.xls.”

The BAM Observation Model export is Xml file “C:\BAMSolution\XlsFile\ POActivityViewExport.xml.”

Use the batch files to deploy (BM_Deploy.bat) and cleanup (BM_Cleanup.bat) the BAM Observation model.

The Tracking Profile is located in the file “C:\BAMSolution\TrackingProfile\PurchaseOrder.btt.”

The Sample input files are located in the folder “C:\BAMSolution\InputFiles.”


In this article you have learned how to work with BizTalk Activity Monitoring (BAM), which ships with BizTalk Server 2006, with the help of illustrations.

User Comments

Title: Images not dispalying   
Name: Manish
Date: 2011-11-24 7:46:50 AM
Hi Naveen,

THe image path are not correctly displaying..
Can u plz check
Title: What is theBAM?   
Name: praveen
Date: 2011-06-12 2:38:24 AM
Hi NAveen, what is the importance of BAM application? Why it is used. what's the difference b/w the BAM and SOAPUI?
Title: REally Nice   
Name: Abhishek Gahlout
Date: 2011-05-06 3:21:15 AM
NICe Article.
Really Appreciate your efforts.
Title: Nice Artical   
Name: PurnachandraRao
Date: 2011-02-11 1:17:43 AM
Hi this is a very good artical thanks Naveen
Title: After Deploying tracking profile what needs to do   
Name: Nagesh
Date: 2010-07-14 8:35:37 AM
please can u explain after deployed tracking file .
when i have tried to view in BAM portal website . i did not see the Aggregation & activity Search
Title: adding activity items, dimentions, measures,...   
Name: peter
Date: 2008-06-25 3:21:27 AM
How do i add/modify activity items, dimentions, measures,...
after deploying bam.that is if everything is working fine and i am able to see everything in bam portal and then i decide to add or modify stuff in the xls book.

Title: Errors in the OLE DB provider   
Name: Per Jan
Date: 2008-05-09 9:37:08 AM
Any solution for the OLE DB provider error?
Title: Errors in the OLE DB provider   
Name: Luke Kennedy
Date: 2007-12-13 6:01:45 AM
Errors in the OLE DB provider. The data source or location is not valid. Provide a valid server to which to connect.
The error message has nothin to do with the real error n completely throws everyone off. Check the bam_process activity_active table, the table is empty because bam has tracked nothing, check the tracking profile is applied correctly and the application is working correctly
Name: Mohan Kuntipuram
Date: 2007-10-10 8:19:10 PM
You are the best. Thanks for a wonderful article which helped me learn more of BAM. Good Work.
Title: BAM Portal Error   
Name: vijay
Date: 2007-06-14 6:46:07 AM
Errors in the OLE DB provider. The data source or location is not valid. Provide a valid server to which to connect

I have copied all the messages from Inputfiles and placed in IN folder
Title: Apologies for late response...   
Name: Naveen Karamchetti
Date: 2007-03-09 4:05:18 PM

I am the author of this article, I was on vacation for a couple of months. So please consider my apologies for not responding to you guys.

Coming to the point...
You would first need to make sure that the BIzTalk installation is correct, in that it has the required
BAM components.

Check the BAM Primary Import database, if there is no
table in this database which corresponds to your view
and if you have not fed in the input data, you would get the error "Errors in the OLE DB provider. The data source or location is not valid. Provide a valid server to which to connect
Title: BAM Porta   
Name: Chandra
Date: 2007-01-09 5:08:23 PM
0 Errors in the OLE DB provider. The data source or location is not valid. Provide a valid server to which to connect

The above error is due to unavailability of data in BAMprimary database. Post the XMLs present under 'InputFiles' folder in 'In' folder. It worked for me.
Title: BAM Portal   
Name: Chandra
Date: 2006-12-19 10:22:53 AM
I have installed the BAM PO Request scenario successfully, I got the following error when I tried to view on BAM Portal. Could you pls. clarify me in this regard. Appreciate your help


POPivotView/Chart View:
The query could not be processed:
0 Errors in the OLE DB provider. The data source or location is not valid. Provide a valid server to which to connect

Activity Search.
There is no data to show in this view
Title: BAM Portal   
Name: Tracy
Date: 2006-12-12 2:01:52 PM
I recieved the same errors as Fred when attempting to interact with the spreadsheet. Any tips on how to modify the spreadsheet to point to the proper DB for cube processing?

What Sharepoint connection string are referring to associated with the product?
Title: BAM Portal   
Name: Fred
Date: 2006-09-13 4:12:06 PM
I installed the BAM PO Request scenario successfully, I got the following error when I tried to view on BAM Portal. I can I get some help on these issues. Thanks


POPivotView/Chart View:
The query could not be processed:
0 Errors in the OLE DB provider. The data source or location is not valid. Provide a valid server to which to connect

Activity Search.
There is no data to show in this view

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2022  |  Page Processed at 2022-01-20 5:26:07 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search