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.
Create an Integration Account
In Azure Portal, and Click “+NEW” and choose “Enterprise Integration”. Select “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.
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 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.
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.
Add a schema file smaller than 2 MB
In the Schemas blade that opens (from the preceding steps), choose Add.
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.
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.
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.
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
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.
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.
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.
Serverless360 is a one platform tool to operate, manage and monitor Azure Serverless components. It provides efficient tooling that is not and likely to be not available in Azure Portal. Try Serverless360 free for 15 days!