We’re excited to announce the preview of the BizTalk Server 2016 connector for Logic Apps. This connector was first shown in May at Integrate 2016 in London and we’ve done a bunch of work to improve it since then. The biggest of these is that the connector now enables you to integrate Logic Apps with BizTalk Server via the recently released On-premises Data Gateway (see here for more details) – our hybrid connectivity gateway that already provides support for SharePoint, SQL Server and DB2 on premises.
If you’d like to try out the new connector, there are four steps you need to follow:
These steps are covered in detail below.
Set up the BizTalk 2016 Logic Apps Adapter
To use the new Logic Apps adapter you’ll need BizTalk Server 2016 CTP2. See here to download and try it out. Alternatively you can quickly create a VM in Azure using the BizTalk Server 2016 CTP2 gallery image.
For details on setting up the adapter see here for details. Once you’ve installed the adapter there are another couple of steps to perform.
Setting up the IIS endpoint
The Logic Apps BizTalk connector is able to access BizTalk via the gateway and at design time, enumerate the schemas and receive locations configured in BizTalk. This makes it easy to send messages to BizTalk in the format expected by your BizTalk applications.
Open IIS (On Windows 10 type inetmgr in the search box next to the Windows icon).
The BizTalk endpoint provides access to information from the BizTalk management database and therefore needs to run under an account that has access. For development purposes you can create a new App Pool running under a local account of a user that has access to BizTalk (e.g. your local user account). You should know that you are not exposing your machine/BizTalk Server to the internet by doing this as you are using the gateway to provide access. The gateway creates a secure connection between your machine and Azure without exposing resources directly to the internet. However, a better approach is to create specific accounts, granting only the necessary access for the endpoint to run under.
Create an App Pool by right-clicking Application Pools and in the dialog that opens, enter the information as shown below. click OK to close the dialog and then, with the new App pool selected in the list, click Advanced Settings. In the dialog that opens, scroll down to Process Model and select Identity. Click the elipsis (…) next to the field and in the dialog that opens provide the account (user/password) to run the App Pool under.
Next, right-click Default Web Site and click Add Application. In the dialog that opens, enter a name for the application as ManagementEndpoint and for the Physical Path enter the following value:
C:\Program Files (x86)\Microsoft BizTalk Server 2016\LogicApp Adapter\BizTalkManagementService
Once you have configured the web application, click OK. To test it, open a web browser and enter the following URL
If this returns a list of schemas (even an empty list if you currently don’t have any schemas deployed) then you are good to go.
Set up BizTalk Application
Note: if you already have a BizTalk Application you want to use you can skip this step.
For the purposes of trying the connector you can use one of the BizTalk Server sample applications. For example, the HelloWorld application is located at the following location after you’ve installed BizTalk.
C:\Program Files (x86)\Microsoft BizTalk Server 2016\SDK\Samples\Orchestrations\HelloWorld
Open a Visual Studio command prompt and run as Administrator. Change the directory to the one above and enter
This will compile the HelloWorld sample and deploy it. As part of this a schema called POSchema.xsd is deployed that we can use from Logic Apps later.
Open the BizTalk admin console, by default the sample has been deployed as BizTalk Application 1. Expand this application and click Receive Locations. Double click the HelloWorldReceiveLocation in the list to open it. Change the Type to LogicApp and click Configure.
For the Address URI enter the following:
For the Public Address field enter the following:
http://<your fully qualified machine name>/HelloWorld/Service1.svc
With IIS still open you also need to create another web application for your BizTalk application. Create a new application, use the app pool from earlier and call the application HelloWorld and enter the following for the Physical Path:
C:\Program Files (x86)\Microsoft BizTalk Server 2016\LogicApp Adapter\BizTalkWcfService
Install the gateway on your machine
Follow the steps here to do this.
Create a gateway resource in your Azure subscription
Follow Step 2 in this article. Note there is a current limitation that the gateway resource and logic apps you create must currently reside in the same region.
Create a Logic App to use the connector
For the forth step, go to portal.azure.com and create a new Logic App (click the ‘+ New’ button at the top left and in the search box, type Logic App and in the search results click Logic App and in the blade that opens click Create.
Fill in the Create blade ensuring that you use SouthEast Asia as the region – right now, the connector is still rolling out and is only in this region. Click OK.
Open the new Logic App and on the template selection page, click the ‘Blank Logic App’ tile. In the designer, select the Request trigger – this will start the logic app when an HTTP request is received. Click the copy icon to copy the http endpoint address to the clipboard as you’ll need this later.
Click + New step and type biztalk in the search box. Select the Prepare message from JSON (Preview) action.
You’ll now need to create a new connection as per the image below. You will need the fully qualified name of your BizTalk server for this. Check Connect via on-premise data gateway and enter the following information to configure the connection:
Now you can configure the action. Note that two things are required – the body input and the schema to use. This action will create an XML message with the correct rootnode and namespace as per the schema you select. For Body select the HTTP body output and for schema, select POSchema.xsd.
Next, add a new action by clicking + New step and type biztalk in the search box. This time pick the BizTalk Server – Send message action. Click the Receive Location dropdown and pick HelloWorldReceiveLocation and for Body, pick the body output of the previous action.
Click Save at the top of the designer.
At this point you can try the Logic App.
Now open an HTTP testing tool such as Fiddler or Postman. This will let you post a message into the logic app. Use the URL of the HTTP trigger that you copied to the clipboard earlier (if you didn’t, just click the HTTP trigger in the logic app to expand it and copy it now). In your testing tool, select POST as the HTTP verb, set the Content-type header to application/json and in the body you can paste the following JSON contents:
Because this is a one-way call to BizTalk, the result should be an HTTP 202. Look on your BizTalk server and you should see the output in the file send directory (called Out by default). If you followed the build steps above the path will be:
C:\Program Files (x86)\Microsoft BizTalk Server 2016\SDK\Samples\Orchestrations\HelloWorld\Out
We’d love to hear what you think of this exciting new capability, so let us know your feedback!