Connecting Azure Logic Apps with Integration Account

|  Posted: February 27, 2017  |  Categories: Microsoft Azure

The Integration Account is part of the Logic Apps Enterprise Integration Pack (EIP) and is a secure, manageable and scalable container for the integration artifacts that we create. We can store maps, schemas, partners, agreements and certificates in our Integration Account once and reference them across all our logic apps making the creation of B2B processes with logic apps quick and easy.

Why should we use Enterprise Integration Pack?

  • we are able to store all our artifacts in one place, which is our integration account.
  • we can leverage the Logic Apps engine and all its connectors to build B2B workflows and integrate with 3rd party SaaS applications, on-premises apps as well as custom applications
  • we can also leverage Azure functions

In this blog, we will discuss how we can connect Azure Logic Apps with an Integration Account.

Use Case Scenario

Let’s assume organizations want to exchange messages electronically, even if they use different protocols and formats. the Enterprise Integration Pack enables you to transform different formats into a format that organizations’ systems can interpret and process. Organizations can exchange messages through industry-standard protocols, including AS2, X12, and EDIFACT. You can also secure messages with both encryption and digital signatures.

If you are familiar with BizTalk Server or Microsoft Azure BizTalk Services, the Enterprise Integration features are easy to use because most concepts are similar. One major difference is that Enterprise Integration Pack uses Integration Accounts to simplify the storage and management of artifacts used in B2B communications.

Integration Account Example

Create an Integration Account

In Azure Portal, and Click “+NEW” and choose “Enterprise Integration”. Select “Integration Account”.

Enterprise Integration Account

In the Create Integration Account blade, enter the Name for our Integration Account, select the Subscription we want to use; either create a new Resource group or select an existing Resource Group, select a Location where our Integration Account will be hosted, select a Pricing tier, then click the Create button.

Integration Account Blade

The process usually takes within 1 minute. Once the template has been provisioned, we will see a notification and the new instances and related resources will appear in the “Resource groups” section of the Microsoft Azure management console.

Integration Account Settings

Add Maps

Integration Account uses maps to transform XML data between formats. A map is an XML document that defines the data in a document that should be transformed into another format.

Select the Maps tile.

New map add in Integration Account

After the Maps blade opens, choose Add. Next, Enter a Name for our map. To upload the map file, choose the folder icon on the right side of the Map text box. After the upload process completes, choose OK.

Adding Map in Integration Account

Add a schema file smaller than 2 MB

In the Schemas blade that opens (from the preceding steps), choose Add.

Integration Account settings

Enter a Name for our schema. Upload the schema file by selecting the folder icon next to the Schema box. After the upload process completes, select OK.

Adding Schema in Integration Account

 

How to link an integration account to a Logic app

Note: We must ensure our Integration Account and Logic app are in the same Azure location.

Select the Integration Account under Setting from our Logic app, we wish to link to our Logic App from the Select an Integration Account drop down list box and click Save Button.

Integration Account with Logic App

We will see a notification that indicates that our Integration Account has been linked to our Logic app and that all artifacts in our Integration Account are now available to our Logic App.

Integration Account linked in Logic App

Adding XML Validation

  • Add a Request – When an HTTP request is received trigger our Logic App
  • Add the XML Validation action, choose Add an action
  • To filter all the actions to the one that we want, enter “xml” in the search box. Choose XML Validation
  • To specify the XML content that we want to validate, select CONTENT.
  • Select the body tag as the content that we want to validate.

Adding Transform XML

  • Add the Transform XML action by first selecting Add an action
  • Enter the word “transform” in the search box to filter all the actions to the one that we want to use
  • Select the Transform XML action
  • Add the XML CONTENT that you transform. We can use any XML data you receive in the HTTP request as the CONTENT. In this example, select the body of the HTTP request that triggered the Logic app
  • Select the name of the Map that you want to use to perform the transformation. The map must already be in our Integration Account. In an earlier step, we already gave our Logic App access to our Integration Account that contains our map

Adding Condition

Conditions are used to perform the action on which we add the condition when the condition matches the requirements.

Choose New Step (+) > Add an Condition.

@equals(xpath(xml(body(‘Transform_XML’)), ‘string(count(/.))’), ‘1’).

Once the Logic App is configured, it should look as shown below.

Logic App configured diagram

Run the Logic App

To test the Logic App, we will use Postman to send a request (POST) with a payload.

  • Set content-type header to application/xml.
  • Set request body to the content of sample-order.xml.

On successful execution, the Logic App will respond with the transformed message (a SAP order) in response body.

Logic App Output

Conclusion

Integration Account stores all our artifacts in one place and references them across all our Logic Apps, making the creation of B2B processes with Logic Apps quick and easy. This is great for ROI because previously created BizTalk artifacts like schemas and maps can be re-used.

Author: Kuppurasu Nagaraj

Kuppurasu Nagaraj is working as a Technical Coordinator at BizTalk360. Microsoft Azure MVP. Having 7+ years of experience and his area of interest is Microsoft Azure, C#, ASP.NET, SQL Server etc.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure Composite Application

Learn more

Start manage and monitor your Azure Services in minutes

Back to Top