Quick Start
  • 22 Oct 2020
  • 3 Minutes to read
  • Dark
  • PDF

Quick Start

  • Dark
  • PDF

Article Summary

Improving User On-Boarding Experience in BAM

Consider when the need is to provision BAM testing Environment quickly, the user will have to set up a business process manually, provision BAM connectors into the required resource group and set up the testing Azure Logic App with the BAM connectors. To make this testing process easier, the user can follow the below process of provisioning the BAM test environment using PowerShell script.

  1. Associate storage principle
  2. Create a business process in BAM (Import Business Process)
  3. Create a new resource group in Azure
  4. Create resources in Azure
  5. Use BAM

Associating Storage Account

To associate a Storage account for BAM user can follow the steps below:

  1. Click on the associate storage icon
    Assocaiate storage account - BAM

  2. Now in this blade, User need to associate both the Azure SQL Database to store transaction records and Storage account to store archived messages
    Assocaiate storage account - BAM

  3. Click Test Connection to validate the connection string and click on save button
    User will now see the screen showing deployment is happening, and the deployment may take a while.
    Deploying Resource

After the storage account association, the user can create a business process flow in Serverless360. To make this process easier, import the template business process as given in the upcoming part.

Import Business process

After associating the Storage account, the next step is to import the Business process.

  1. Click on the Import Business Process button
    Import Business Process

  2. Click on Select File button and select the Business Process Json file that is downloaded from the below link


Now the Business Process is imported, and the next step is to deploy the Logic App configured with BAM connectors using Powershell, CloudShell or Azure CLI.

Instrument Business Process

Again, to instrument Business process, the user must make some changes in their existing Business process. But to make the user feel the experience more easily, the user can run the scripts given below in their Azure Cloud Shell and deploy resources to the required Subscription.

  1. Open Azure portal
  2. Create a new resource group if you want to deploy the resource in anew resource group. This step can be skipped if you want to deploy the resources in an existing resource group.
  3. Click on the Cloud Shell icon from the Azure portal
    Azure Cloud CLI
  4. Run the following Powershell scripts
$subscriptionId = Read-Host -Prompt "Enter the Subscription ID"
$resourceGroupName = Read-Host -Prompt "Enter the Resource Group name" 
$bamEndpoint = Read-Host -Prompt "Enter the BAM API Endpoint"
$apiKey = Read-Host -Prompt "Enter the BAM API Key"
$secureString = ConvertTo-SecureString $apiKey –asplaintext –force

New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName ` -SubscriptionID $subscriptionId ` -BAMEndpoint $bamEndpoint -TemplateUri https://raw.githubusercontent.com/Serverless360/serverless360-bam-lib/master/Kovai.Serverless360.Sample/BamCustomConnector.json

New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName ` -SubscriptionID $subscriptionId ` -APIKey $secureString -TemplateUri https://raw.githubusercontent.com/Serverless360/serverless360-bam-lib/master/Kovai.Serverless360.Sample/BamConnection.json

New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName ` -SubscriptionID $subscriptionId ` -TemplateUri https://raw.githubusercontent.com/Serverless360/serverless360-bam-lib/master/Kovai.Serverless360.Sample/BamLogicApp.json

  1. BAM API Endpoint and Key can be found in the Serverless360 portal by moving to the below mentioned path

Settings>Access Keys>BAM Connection Details>Function App API Key


While executing the scripts, check the value of the ProvisioningState. The State of Provisioning state should be Succeeded.

ProvisioningState: Succeeded

  1. After provisioning the resources, Go to the appropriate resource group where you can find the deployed resources
    Resource Group

  2. Now get the HTTP endpoint from the HTTP Request connector and trigger it with the below given JSON body
    Logic App Designer

Body Format: 
"Topic": "BAM_Testing",
"UserId": "sl360_u001475",
"DriverId": "sl360_d0058962",
"DriverLocation": "Location1",
"UserLocation": "Pickup Location 1",
"Destination": "User Destination001",
"IsValid": false

Achieving End to End Visibility

Once the messages have been triggered, User can view those data in the BAM section of Serverless360. User can move to the tracking tab inside BAM to investigate the transactions in the created business process.
BAM Transaction

To investigate on a transaction, user can click the more options icon and select View Transaction Details
View Transaction Details

For every business, there will be some business properties that we want to track. Those properties can be tracked in BAM which can be found in the Tracked Data tab.
Tracked Data

Below are a few articles to know more about Business Activity Monitoring
Tracking Hybrid Application Using Serverless360 BAM
Uncover the Logic Apps Business Exceptions Using Serverless360 BAM

Was this article helpful?