Sunday, January 8, 2017

Azure BizTalk FlatFile Decoder to XML Map

In the previous post we created the Flat File XML from the FlatFile decoder.
Now we will map it to the XML Schema.

So first we need to create the map in Visual Studio.
Once the map is created( you can test it using the FlatFIle XML we got back in the last post).
Test map will not work with Flatfile in native has to be XML Input...its buggy.

Once you have created the map you need to upload it to the Azure Portal(Integration Account).
Azure doenot support .btm file.
So you need to Debug the map and upload the .xsl file it creates to your (Integration Account).

So lets upload the .xsl file to Azure(Integration Account).

Now we need to go to the Logic App we created last and Add the "Transform" shape to it where we will call this map to convert the FlatFile Xml to another mapped Xml Output.
Important here is to configure the map.
Content:  Input to Map: which will be output(XML) from Flat File Decoding.
Map:  Select the map we just uploaded to our Integration Account. It wil show in the dropdown window if the Integration Account is linked to the Logic App.

Run the Logic App. It will show some Errors but dont worry all is well until now.

Now we will test the map using Postman with the same Flat File input.
In the map I am concetenatiing FirstName and LastName.
Just a note: There are many BizTalk functoids like Database Functoids missing in the toolbox...seems Microsoft is still adding stuff to the map.

Voila it works. The FullName contains the FirstName and LastName.
 I noticed Richard used some Azure Functions to call the maps.I did not needed any. Looks like I need to look into Azure functions or seems Microsoft has changed the Transform Shape recently.

Finally I have uploaded the Schemas/map/Test file out here.
Just download it and test it using Azure.

No comments:

Post a Comment