Friday, 16 November 2018

Migrating BizTalk Transformation To Azure using Azure Function as an API

In this article, I would brief about Migrating BizTalk Transformation As-Is to Azure Function(API) and this can be invoked from Logic App. Thus the transformation can be execute across different resource group, region and integration account.

Using Azure SDK, I have create a simple HTTP Trigger function. This has two projects, TrasformationHelper(TransformAPI) and AzureFunctionHelper.

In TransformAPI, we extract the request body and map name from the query string and invoke utility helper for the transformation.
In AzureFunctionHelper, I have embedded the XSLT and Extension Objects as resource files and based on the MapName, we would dynamically execute the transformation and render the transformed result as HTTP Response to client.
Here is the XSLT for one of the transformation and this invoke external assembly methods, as shown. External assembly method does DB Lookup. Lets add the reference of External Assembly to Azure Function Project.
Lets configure hybrid connection in Azure Function. select Networking and click on configure your hybrid connection endpoints. Click on Add hybrid Connection, 
Create a new or bind to existing Hybrid Connection. Refer my earlier article for configuring azure hybrid connection to access on-prem sql server.
Lets deploy and test the Azure function API. This can be invoked from Logic App to achieve dynamic transformation.
Note:- External Assembly would be package as part of Azure Function Package. This allows us to completely re-use BizTalk Transformation as-is.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.