Monday, November 14, 2016

BizTalk Server Logic Apps Adapter (II)

In the last post we saw how to connect BizTalk Server with third-party SaaS applications and Azure services via Logic Apps adapter. In this new post we analyze the necessary steps to connect Logic Apps with the on-premises Line of Business (LOB) applications via BizTalk Server.


The communication between Logic Apps and BizTalk Server is based on two components: BizTalk Server adapter for Logic Apps (on-premise) and  BizTalk Server connector for Logic Apps (cloud).  It is necessary to comply the following requeriments for components to be able to communicate at both design time and runtime:

  • Setting up the BizTalk Management Service: This service is deployed on the BizTalk Server servers along with the adapter for Logic Apps and allow at design time to enumerate the schemas and receive locations existing in our BizTalk Server servers. We must follow two steps to configure it:
    1. Create a new web application in IIS and set the following value for the Phisical Path property:
%PROGRAMFILES(X86)%\Microsoft BizTalk Server 2016\LogicApp Adapter\BizTalkManagementService
    1. Configure the new application to run under an identity account with access permissions to the BizTalk Management database.
These steps can be automated with PowerShell as you can see in the following article published by Mikael Sand.

  • Installing and Configuring the Gateway for Logic Apps: This service is desployed in our on-premise infrastructure and leaning on Azure Service Bus to act as a bridge between our on-premise resources (in this case, BizTalk Server) and our cloud services (in this case, Logic Apps). The configuration process is easy, we must  sign-in Azure and set the gateway name and a recovery key.

The gateway is deployed as a Windows Service, so we can manage it from the Windows Services console.

  • Associating the gateway with our subscription: Once the Gateway has been installed and configured in or on-premise infrastructure, we must associate it with our Azure subscription to connect our on-premise resources with our Azure services. For that we must create a new resource of type "On-Premise Data Gateway" using as "Installation Name" the gateway name selected in the previous step.

Logic App Adapter

Once the pre-requirements have been completed we can already create a BizTalk Server application to receive the generated messages by Logic Apps. The steps to follow are:

  • The Logic Apps adapter run in the context of an isolated Host, that is, outside of the normal BizTalk Server runtime process. For that reason, the first step we must follow is the creation of a new web application in IIS that runs under an identity that is a member of the "BizTalk Isolated Host Users" group and that allows the BizTalk Server Connector for Logic Apps component to access our receive location.
  • In the second step, we'll create a new Receive Location configured with the adapter for Logic Apps to receive the messages and publish them in the MessageBox.

  • In the third and last step we must configure the following Receive Location properties:
    • Address (Uri): We must specify the web application path created in the first step for this property, eg: 
    • Public Address: In this property we must specify the fully qualified URI, ie, the combination of the server name and the web application, eg:
http://{fq server name}/LogicAppsCreateAccount/CreateAccountService.svc

And finally ... our Logic App

We are ready to create a new Logic App in our Azure subscription that interacts with our on-premises BizTalk Server. For this, we can use two actions types:

  • We can use actions of type "Prepare message..." that allows us to convert the message that we want to send from JSON format to XML format and vice versa:

  • We can also use an action of type "Send Message" to send the processed message to our on-premises BizTalk Server.

Although in both cases, we must first create a connection that allow us to connect to our on-premises BizTalk Server through the gateway.

To establish the connection through the gateway we select "Connect via on-premise data gateway" checkbox and we fill in the following properties:
  • BizTalk Server URL: Enter the full URL of the Logic Apps adapter management service configured above.
  • Authentication Type: Select the authentication type from the dropdown, we can choose between Windows and Anonymous.
  • UserName & Password: If we want to use Windows security, we must set the full username and password used by the Application Pool of the Logic Apps adapter management service configured above.
  • Gateway: Lastly, we must enter the gateway name created earlier.


Connect Logic Apps with BizTalk Server to expand our on-premises Line of Business (LOB) systems to the cloud requires a laborious configuration process in first instance, although it's completely reusable for the following. On the other hand, if our BizTalk Server server is an Azure IaaS virtual machine the process is easier, since it's not necessary to use a gateway to connect both worlds...

For more information about how to use BizTalk Server adapter for Logic Apps, I recommend you visit the fantastic online help released by Microsoft product team.

No comments:

Post a Comment