Migrating an EDI solution from BizTalk to Logic Apps – Part 2

Posted: September 3, 2018  |  Categories: BizTalk Logic Apps
Tags:

Continuing the series of posts about migrating an EDI solution from BizTalk to Logic Apps, I’ll be talking now about the configuration of Logic Apps and also about the EDI inbound process. You can see the first part of the series here: http://www.alessandromoura.com.br/2018/08/25/migrating-an-edi-solution-from-biztalk-to-logic-apps-part-1/

Logic Apps Solution

For the Logic Apps solution, we will need the schemas and maps created in BizTalk only. We are not going to use orchestrations and/or pipelines since for these components we will use the Logic App to replicate the orchestration and for the pipelines, we will use the connectors. Another thing we will do is to replicate some of the configurations we did for parties and agreements.

Integration Account

To store the schemas, maps, parties, and agreements, we need to create one integration account resource in Azure. The picture below shows the parameters we need to specify when creating a new integration account. Please be aware of the costs related to the integration account. Today there are three pricing tiers with Free, Basic and Standard. Free you don’t pay anything but it’s not meant for a production environment since you don’t have any SLA’s associated with it. Basic will cost about $300 USD and Standard will be about $1,000 USD per month. Once you set up an integration account and it is live, you are paying for it, using it or not.

Once the integration account is created you can start adding or creating the artifacts you need to upload on it. For our scenario, I uploaded the schemas and maps created by the BizTalk solution we did earlier. In the BizTalk solution, I have 6 schemas and 2 maps as you can see below. 

About the configuration of the Partners, I have one for my company, the CompanyX and another one for my client, the Client1. I’m configuring the id’s by which they will identify each other in the EDI document with the qualifier ZZZ as you can see below.

And the last thing we need before developing the Logic Apps workflows is the agreement between the two partners. In the agreement, we will specify how each partner will know each other by the id. We will also specify what needs to happen when receiving or sending the EDI documents.

Note in the highlighted area that I’m specifying for this agreement between the client and the company that I’ll receive the ORDER EDI document.

Inbound Process

Now that the configuration is complete in the integration account, we can start designing the logic app to receive the document and insert the details into the database.

The first thing that I’m doing is specifying from where I’ll receive the EDI documents, and I choose a Blob Storage for that as you can see below. Please note that I’m first getting the metadata of the files I’ll process and in a second step I’m getting the content of the files. This is the behavior that the connector gives to us today.

Once I have the content of the file, I need to to use the Decode EDIFACT connector so I can have the message validated against the configuration we did for partners and agreements. It will basically identify the partners, the agreement to be used and will create an XML version of the EDI file similar to what BizTalk does.

Here is an example of the response of the Decode EDIFACT connector. Note that we have two sections in this response, one with the good messages and another one with bad messages along with some other properties that I can discuss in another post.

And here is the content of the payload field that is encoded in base64:

Now that I have the EDI document in an XML format, I can use the map that I got from my BizTalk project and uploaded in the integration account. As you can see below, I’m calling the Transform XML specifying to the Logic App to use the EDI_to_SQL map. After that I’m using the Parse JSON action to help me work better, having tokens to identify each field and then when calling the Insert Row, I’m using those tokens for each field I want to send data to the database.

The final result of this process is having the data stored in the database as the picture shows.

Summary

So, this concludes this second part of a series of four parts. In this post I showed how to migrate the EDI inbound process from BizTalk to Logic Apps. In the next post, I’ll be explaining how to migrate the EDI outbound process.

Author: Alessandro Moura

Certified BizTalk, Mulesoft, TOGAF and Azure. Integration Specialist. Solutions Architect.

Leave a Reply

turbo360

Back to Top