- 22 Aug 2023
- 3 Minutes to read
- Print
- DarkLight
- PDF
BizTalk only scenario
- Updated on 22 Aug 2023
- 3 Minutes to read
- Print
- DarkLight
- PDF
Atomic Scope helps in getting an end to end visibility of integration solutions built using Azure Integration services such as Logic Apps, Azure Functions, APIM etc. In this article we will walk you through a sample Purchase Order processing scenario implimented using BizTalk server.
Scenario
Let us consider a scenario where a purchase order is received from a BizTalk recieve location and then routed to three different send ports. This is a typical messaging only scenario . Lets name the business process as Kovai.Sales and call the transaction as MessagingOnlyScenario .
Note: The transaction must be generally named after the message type or the business transaction name. However in our sample we are using scenario as transaction name.
As we can see from the diagram, we have four stages in the transaction flow. They are Rcv_MessagingOnly, sndPort_MessagingOnly1, sndPort_MessagingOnly2, sndPort_MessagingOnly3.
Pre-Requisites
To continue impimenting the scenario, please ensure you have followed the below steps.
1> Ensure you have installed Atomic Scope Core components
2> Ensure that you have activated Atomic Scope License
3> Ensure that you have deployed BizTalk samples
4> Ensure that you have created a work space and added associated azure resource group
Business Process configuration
In this section we will walk you through creating a business process, a transaction, stages and tracking the necessary data.
Note: You can directly import the configuration file if you do not want to recreate it from the beggining.
* Navigate to Business Process section in Atomic Scope portal
* Click Import , choose configuration file C:\Program Files (x86)\Kovai Ltd\AtomicScope\SDK\Samples\Configuration\Kovai.Sales-Config.json
* Select Kovai.Sales from the list and click import.
Creating Business Process
- In Atomic Scope portal, navigate to Business Process section and click on Add Business Process button
- Name the business process as Kovai.Sales
Creating Business Transaction
Click on Add Transaction, name the transaction as MessagingOnlyScenario.
Creating Stages
Follow the steps below to create a stage called Rcv_MessagingOnly which will be executed in BizTalk receive location rcvLoc_MessagingOnly.
Click on Add stage
Name the stage as Rcv_MessagingOnly
Similarly, create three more stages named sndPort_MessagingOnly1, sndPort_MessagingOnly2, sndPort_MessagingOnly3 each of which execute in BizTalk send ports.
Adding Global Properties
Once we create the stages, we can start adding the tracked properties which will be collected during the runtime. The global properties are those which will be available in the grid.
In the Rcv_MessagingOnly stage, add a global property called SenderId as below.
Similarly add following other global properties.
Stage | Propertyname | PropertyType | PropertySource | Value |
---|---|---|---|---|
Rcv_MessagingOnly | ReceiverId | String | XPath | //ReceiverId/text() |
Rcv_MessagingOnly | MessageId | String | Xpath | //OrderId/text() |
Rcv_MessagingOnly | Correlation | String | BizTalk Context | https://Kovai.AtomicScope.BizTalk.Samples.Schemas#LastName |
sndPort_MessagingOnly3 | Country | String | Xpath | /[local-name()='SalesOrder' and namespace-uri()='http://Kovai.AtomicScope.BizTalk.Samples.Schemas']/[local-name()='OrderId' and namespace-uri()=''] |
Adding Stage Properties
Similar to global properties we can add the following stage properties. Stage properties are collected at each stage and available as tracked values.
Stage | Propertyname | PropertyType | PropertySource | Value |
---|---|---|---|---|
sndPort_MessagingOnly1 | Quantity | String | XPath | /[local-name()='SalesOrder' and namespace-uri()='http://Kovai.AtomicScope.BizTalk.Samples.Schemas']/[local-name()='Quantity' and namespace-uri()=''] |
Instrumenting in BizTalk receive location
The receive location rcvLoc_MessagingOnly , receives the messages from a folder location. Since we consider the receive location as one stage, we need to start and update the activity in the receive pipeline. The receive pipeline configuration is as below.
Note : It is recommended to archive the message at the beginning of a receive pipeline.
When the BizTalk samples are deployed, the receive location configuration will be automatically available. we do not need to change any pipeline configuration.
Instrumenting in BizTalk Send Port
When the message is subscribed by a send port, the message will already have MainActivityId and PreviousStage informations.
In sndPort_MessagingOnly1 send port
Since the message context will already have a Business Process name and Business transaction names , it is not necessary to configure them in send port pipeline.
In sndPort_MessagingOnly2 send port
It is recommended to archive the message which is leaving the BizTalk environment.
in sndPort_MessagingOnly3 send port
It is possible to start and update the activity in a single pipeline component as shown below.
Running the Scenario
Use the sample XML file C:\Program Files (x86)\Kovai Ltd\AtomicScope\SDK\Samples\TestLocations\POsample01.xml and place it in the folder location C:\Program Files (x86)\Kovai Ltd\AtomicScope\SDK\Samples\TestLocations\MessagingOnly\in
Tracking Flow
When the message is picked up and executed by the BizTalk server, we will see an entry into Atomic Scope as shown below.
Summary
In this article we looked into implementing an Atomic Scope solution in messaging only BizTalk scenario.