Try for free Book a demo

Step by Step Guide to Configure BAM in Turbo360

Turbo360

7 Mins Read | Last modified on February 29th, 2024

BAM- step-by-step guide-01 (1)

Today’s integration scenarios span across boundaries. This brings its own challenges, one of them is getting the end-to-end visibility of your transactions. In any kind of integration solution, there is a need for the most organization to build end-to-end traceability/monitoring solution that can be used by the business users. The simplest and best example could be – Where is my booking acknowledgment?

Typically, teams spend about 20-30% of their time addressing this challenge by building custom solutions like Logging Components and Web Dashboards.

Most of the time the solution will be premature since building an enterprise-grade tracking/monitoring solution requires enormous effort. That’s exactly the challenge we are solving in Turbo360 with Business Activity Monitoring (BAM) feature.

This article will serve as a guide to achieve effective Business Activity Monitoring on your Azure Serverless application using Turbo360.

Scope of this article would be:

  • Defining Business Process in Turbo360.
  • Instrumenting Logic Apps with BAM connectors to send the tracked data to Turbo360.
  • Enabling end to end tracking and analysis.

Business Scenario

To have the better understanding of the process, let’s consider a real time cab booking scenario in Fly Wheels Cab booking application.

1.Orchestration

In this scenario, whenever the user books a cab in the FlyWheelCabs application, the web client will send the booking message to the Service Bus Queue named bookinghandler. Now, the Logic App named BookingProcessor will get triggered when there is a new message in the bookinghandler Queue.

This Logic App will check if the user details and driver details are valid with Function App named ValidateBooking. Depending on if both the details are valid or invalid, those messages will be sent to Service Bus Topic datavalidator with appropriate label. The Topic consists of 2 Topic subscriptions ValidDatavalidator and InValidDatavalidator. Based on the Topic subscription rules defined, messages will be automatically moved to the concerned subscription.

Now, we are going to track the transaction and every stage in the above scenario with Turbo360 BAM. To track the Business Process, we need to do some instrumentation in Turbo360 as well as in the Logic App.

  1. Define Business Process
  2. To perform end to end tracking of the Business Process in the BAM section of a Composite Application in Turbo360, the Business Process should be defined.

    Before proceeding further, we strongly recommend reading this article on – What are Business Processes?

    • On the left navigation bar in Turbo360 application home page, Business Process menu can be found.
      2.   Business Process
    • click Add Business Process button to add a new one.
    • You will be navigated to Business Process section. There exists the option to define the Business Process. In this scenario, the Business Process is named as BookingValidation.
    • Add transactions to the Business Process. Add transaction named DetailsValidator, direction would be inbound and click save. we can add any number of transactions as per the business need.
      3.Add Transaction
    • Now, we need to define the stages those will be involved in the Business Process. In this scenario, we can define stages for message into the Queue, details validation by Azure Functions and sending message to Service Bus Topic.
    • To define a stage, click + button in the transaction to add the stages. I have defined the stages with the name MsgRecvdInQueue which denotes the trigger connector of Logic App, DetailsValidationFunc_U which denotes the validation of user details with Function App, DetailsValidationFunc_D corresponds to the validation of driver details with Function App and SendMsgToTopic which denotes sending validated messages to Topic subscriptions.
    • Reprocessing setting can be configured with HTTP endpoint, Service Bus Queue or Topic and Event Grid as required. For this case, I have defined the reprocess to bookinghandler Service Bus Queue.
    • Here is how the final configuration should be:

      4.complete setup BP

      Read more about defining Business Process here.

  3. Instrumentation in Logic Apps
  4. We have defined the Business Process, transaction and stages. Now, let’s instrument the Logic Apps with BAM connectors to track our orchestration against the defined Business Process.

    Below is the design view of the Logic App defining the Fly wheels Cab booking application, which needs to be instrumented with the Turbo360 BAM connectors.

    5.LogicAppConfig

    Turbo360 BAM Connector for Logic App can be found in the Azure portal.

    Every stage in the Business Process will map to a Start Activity and Update Activity.

    In this connector, we need to pass the Service Bus data that need to be tracked into Message Body, Message Header. Set Business Process name as BookingValidation, Business transaction as DetailsValidation, Stage name as MsgRecvdInQueue to define first stage of the Business Process. If the message content should be displayed in the Turbo360 portal, then set the value of Archive message to True.

    6.Start an Activity

    We have defined the Start an activity. Now, we should define the Update an Activity connector to complete the Stage. Define the MainActivityId, StageActivityId of the corresponding Start an Activity connector, Business Process name, Business Transaction name and Current Stage name that need to be completed. Whenever the Logic App gets triggered MsgRecvdInQueue stage will be tracked in the BAM of Turbo360.

    7.Update an activity

    As of now, we have defined the first stage of the Business Process. Now, we need to do the same process for user and driver details validation Function App as below:

    8.BAM for Function Validation

    In the Start an Activity 2 connector we need to define the MainActivityId and PreviousStage name and Currentstage as DetailsValidationFunc_D for driver details validation Function and DetailsValidationFunc_U for user details validation Function as below:

    9.Connecting Activities

    Till now, we have instrumented the Logic App to track till details validation.

    The next Logic App action sends the message to Service Bus Topic named datavalidator with the value for label as true if both user and driver details are valid or false if any one of the details is invalid.

    Here is how it should be defined:

    10.send message to Topic

    As a user, I wanted to get intimated when there is an invalid user or driver so we can use Log an exception connector to log the exception message as invalid user or driver details. Below is configuration for log an exception:

    11.log an exception

    Mark the status of the Update an activity 5 as Failure.

    12.UpdateAsFailure

    Read more about BAM connectors and configuration here

  5. Track the Business Process
  6. To track the Business Process, we need to associate the Business Process into the appropriate Composite Application.

    1. Go to BAM section in a Composite Application. click Manage Business Process button and select BookingValidation Business Process.
      13.manage bp
    2. Once the Business Process is defined and instrumented, end to end tracking on the Business Process is possible.
    3. Below is the graphical view of the Business Process we configured when a user or driver details are invalid.
    4. 14.GraphView

    Now, it is possible to view the in-depth details of every stage, view tracked properties and repair & reprocess the failed Business Process to any of stage configured with the reprocessing setting.

    Read more about BAM association here.

  7. BAM Analytics
  8. Analytics on the collected BAM information is critical to make strategic business decisions. Turbo360 offers the BAM Analytics which addresses this need. Let’s see how we can configure the BAM Analytics for cab booking Scenario.

    1. Create the Analytics Dashboard, so go to BAM Analytics section and click New Dashboard.
    2. Give a name to the Dashboard as Staging Booking Management and click the Add Widget. For this scenario, I am creating Widgets which gives a complete overview of bookings at various cities (Pie chart), the booking trend of a user (Bar chart) and driver location (Line chart).
    3. For adding the Widget, we need to provide the Name, Query with which the Widget should provide the Insights, Period and Report Type. If the Query is blank it will process for all transaction records of the Business Processes in that Composite Application.
      15.Widget
    4. After creating the Widgets and Dashboard, we get the Analytics of the BAM with configurable time interval.
      16.BAM Analytics

Conclusion

This blog serves as a guide to configure Business Activity Monitoring in Turbo360 for a cab booking scenario. Click here to know more about Business Activity Monitoring in Turbo360.

This article was originally published on Aug 9, 2019. It was most recently updated on Feb 29, 2024.

Related Articles