BAM API

In BizTalk, BAM (Business Activity Monitoring) can be applied on pipeline and in orchestration. BizTalk also provide Tracking Profile Editor tool to implement BAM in BizTalk,  You can get info about tacking profile editor from below reference:  https://msdn.microsoft.com/en-us/library/aa547038.aspx.

But this tracking tool has some limitation (for more info you can refer to https://blog.sandro-pereira.com/2010/08/20/bam-limitation-of-tracking-profile-editor-tpe ),  that’s why we need to move to apply BAM through programming. Here we are going to implement BAM in BizTalk through programming. Before going to coding we need to understand concept of BAM API, which is used in BAM Programming.

The BAM API defines four main classes:

  • DirectEventStream (Synchronous, no latency): used in a .NET application to do a buffered write of data to BAM. Here data is persisted synchronously to the BAM Primary Import database. Except for DES, all other EventStream classes are asynchronous and have some latency. The data is first persisted to MessageBox and subsequently processed by TDDS which moves data into the BAMPrimaryImport database.
  • BufferedEventStream (Asynchronous, high throughput, some latency): used in a .NET application to do an unbuffered write of data to BAM.
  • OrchestrationEventStream (Asynchronous, participates in BizTalk orchestration transactions): used within an orchestration; Provides transactional consistency with the orchestration.
  • MessagingEventStream (Asynchronous, participates in BizTalk Server pipeline transactions): used within a pipeline; Provides transactional consistency with the messaging engine.

All of these classes are derived from the base class EventStream.

Note:

For BizTalk OrchestrationEventStream (For Orchestrations) and MessagingEventStream (For Pipelines) are applicable and other two event streams are applicable for non-Biztalk e.g. WCF and WF. Link is below for how to apply BAM through BAM API in BizTalk Pipeline and Orchestration.

Apply BAM in Pipeline:

https://vkbiztalk.wordpress.com/2017/07/26/bam-in-custom-pipeline/

Apply BAM in Orchestration:

https://vkbiztalk.wordpress.com/2017/07/27/bam-in-orchestration/

The EventStream APIs for BAM reside in the Microsoft.BizTalk.BAM.EventObservation namespace. To code against the APIs, you must add the following DLLs to your project reference and include the namespace in your code with the following using statement:

using Microsoft.BizTalk.Bam.EventObservation;

  • BizTalk.BAM.EventObservation.dll (Available at C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Tracking)
  • Biztalk.BAM.Xlangs.dll (Available at C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2\Tracking): This DLL is required when coding for Orchestration event streams.
  • BizTalk.Pipeline.dll (Available at C:\Program Files (x86)\Microsoft BizTalk Server 2013 R2): This DLL required when using coding pipeline contexts for Messaging event streams.
Advertisements

BAM (Business Activity Monitoring)

BAM is the optional and important part of BizTalk. Its available when we are installing BizTalk Server.

BAM is used for monitor the data and milestone of the messages in near real time, which are passing thought the BizTalk.

Its show the tracking information of messages on web Portal to Business people who don’t know about the BizTalk inside activity. So, Business people or users will know about the details which is require when the messages processing in BizTalk. It shows when messages is processed through BizTalk, has it successful passed or not. And also generate alert message if require.

BAM is rich set of Tools for monitoring. It’s available along with BizTalk Licence. BAM Portal is ASP.NET Component.

In terms of MSDN (https://msdn.microsoft.com/en-us/library/aa560139.aspx)

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.

Benefits of BAM

  • BAM portal- Here user can track all the details for messages, aggregate data and generate alert.
  • BAM as a reporting solution provides a familiar environment to business users by taking advantage of Office and Sharepoint
  • Unlike application development, BizTalk development often does not have anything tangible which can be shown to a client. BAM will provide them information about their business processes and can help them to see the benefits of the solution
  • BAM can be implemented in easy way with some small coding if we write BAM programatically and with no code in case of Tracking Profile Editor
  • BAM is a built-in feature of BizTalk which a company who invests in BizTalk will already have made
  • In Most of the Project development, BAM is always chosen as second phase. In Existing BizTalk Project, BAM will add as an additional layer to the solution. You would simply deploy the BAM artifacts to the existing BizTalk group