- 22 Oct 2020
- 3 Minutes to read
- Print
- DarkLight
- PDF
Quick Start
- Updated on 22 Oct 2020
- 3 Minutes to read
- Print
- DarkLight
- PDF
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.
- Associate storage principle
- Create a business process in BAM (Import Business Process)
- Create a new resource group in Azure
- Create resources in Azure
- Use BAM
Associating Storage Account
To associate a Storage account for BAM user can follow the steps below:
Click on the associate storage icon
Now in this blade, User need to associate both the Azure SQL Database to store transaction records and Storage account to store archived messages
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.
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.
Click on the Import Business Process button
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.
- Open Azure portal
- 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.
- Click on the Cloud Shell icon from the Azure portal
- 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
- 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
After provisioning the resources, Go to the appropriate resource group where you can find the deployed resources
Now get the HTTP endpoint from the HTTP Request connector and trigger it with the below given JSON body
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.
To investigate on a transaction, user can click the more options icon and select 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.
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