Showing posts with label AzureBizTalkSeries. Show all posts
Showing posts with label AzureBizTalkSeries. Show all posts

Wednesday, 28 August 2019

Azure DevOps CI-CD for BizTalk with BTDF and Powershell

In this blog, I would showcase a simple demo to deploy application with BTDF and Powershell scripts using Azure Devops CI-CD pipeline.

In the BizTalk solution, I added the power-shell scripts to the solution as shown below and customized the RunDeployment.ps1 script to be generic by taking in parameters(Application, Deployment Type and Environment),please refer this article for the power-shell scripts.
Refer below screen shot for CI Pipeline configuration. Here, I'm building the BizTalk solution and then with msbuild task we are building the BTDF project. Once we have the msi file, we are copying those binaries to the staging area and then packaging to the Azure Artifacts.
Refer below screen shot for CD Pipeline configuration, here we have added just power-shell task and configured the parameters.
In order to achieve CI-CD, I enabled the continuous integration and delivery options. Now, for every check-in against the master branch, BizTalk application would be deployed in corresponding environment.

Wednesday, 2 January 2019

Liquid Transformation As a Azure Function using DotLiquid

In this article, I would brief about achieving Liquid Template Transformation using DotLiquid in a Azure Function.

Using Azure SDK, I have create a simple HTTP Trigger function. This has two projects, LiquidTransformationApp(LiquidTransformation) and AzureFunctions.Helper.

In LiquidTransformation, we extract the request body, map name and map type from the query string and invoke utility helper for the transformation, as shown

Here is utility helper class with does the Parse and Render of the Liquid Template. I have embedded the liquid templates as as resource files and based on the MapName and MapType, we would dynamically execute the transformation and render the transformed result as HTTP Response to client. 

Here, we receive JSON request and JSON request would contain nested JObject/Array, thus to parse the JSON request as Dictionary Object, we use ParseJSONHelper and GenericInterface<T> and Generic<T> are used in Parse and Render stages of Liquid Templates to achieve support for dynamic objects.

Here are the Json To Json and Json To XML Transformation liquid templates.
Lets run and verify the Liquid Template Transformation

Saturday, 17 February 2018

Build Pub-Sub Model Using Azure Functions | Integrate Azure Function


In this article, I would brief about integrating function with another function.

Lets create timer function, here we would add a simple class file, common.csx with property function and enumeration as shown.

This function would act as message publisher, this would publish messages to event-hub and subscriber function would receive and process the message from event-hub.

Lets add, output for the function from Integrate tab and choose Azure EventHubs and then configure the connection details.

Lets publish a messages to event-hub from the Run method, as shown. Every minute messages are published to event-hub.
Now, lets create a subscriber event-hub trigger function and configure the same event-hub details. Let's keep the function simple, as shown below.
Once both functions are up and running, we can see message being exchanged from publisher and subscriber functions.

Basics of Azure Function | App Service | PAAS


In this article, we will see how to accomplish a simple scheduler type of task in azure using Azure Function.

Lets create a Function App from Azure; New->Function App and then provide the function details and choose the Hosting Plan either a consumption plan or App Service Plan depending on the requirement.

From quick start, choose Timer and C sharp as the programming language.

Sample timer function code is generated. Under the function, we can see Integrate and Manage and Monitor tabs.

Integrate option can be used to define Input and Output type of function; thus this allows us to integrate with different azure services like event-hub, logic app, service bus and etc.
Monitor tab provides the log details of each executions, as shown above.

Lets create a console application, This can contain any business logic like generating a session variable or clean up or re-conciliation activity. For our purpose, lets keep it simple, our console which reads a value from config file.

Lets add log4net for logging traces inside console as shown.


Now, lets add another function under the Function App, then upload the log4net and console exe and finally lets invoke to exe using from the function Run method as shown below.
Function executes every minute based on CRON expression and thus log files are generated and can be seem in the function drive.
Logs of function can be seen in the log pane.

Thursday, 12 October 2017

BizTalk Server 2016 | Application Insight Logging | Azure-BizTalk


In this article, I will explain the steps involved in sending BizTalk tracking data/trace details to Azure Application Insights.

Lets create an instance of Application Insights in Azure portal as shown below, 
  • Log on to Azure portal and add a new application insights instance and Provide an appropriate name. 
  • Choose application type as General. 


Make sure you Download the BizTalk Server 2016 Feature Pack 1; this update enables BizTalk to integrate with Azure Application Insight. Once the feature pack is installed, we can see a section called “Analytics” in BizTalk Group hub settings page.
Once the analytics is configured at the group level, now we can enabling tracking at individual artifacts level, as shown below.
I have enabled the Analytics for send port, receive and orchestration. This ensures that all the data will be pushed to Application insights. From Application Insight azure portal; You can explore these metrics and create graphs for data visualization; once the data is pumped to Application Insights.


Below are few pointers on AppInsight logging mechanism for BizTalk. 
  • Captures analytics on BizTalk Message Box only.
  • Context Properties available on messages are captured in App Insight.
  • For Physical Ports 2 entries are made (Receive and Send | Publish Subscriber)
  • For each logical Port, an entry is made (Orchestration)
  • There should be a dedicated Send Port for routing exception message to capture exceptiondetails in App Insight.
  • Analytics can be captured at Ports and Orchestrations. It’s not mandate to enable tracking at ports and orchestrations; enabling analytics is sufficient.
  • Orchestration entries are captured with respect to logical ports. If call or start orchestration doesn’t have any logical ports; analytics entries for these orchestration aren’t captured.
Here is my simple helper class using this we could capture the trace details from orchestration.
This is my simple orchestration, which would send the trace logs to application insight using the helper class.
As you can see the logs are available under traces.