Hybrid Integration – Send files to Azure Blob Storage container via Microsoft BizTalk Server

scenario

Hybrid Integration can allow us to work and combine both on-premise and cloud integration. Moving everything to cloud might not be the best solution but making the use of hybrid integration will deliver flawless stability for enterprises that integrates data from on-premise to cloud data and guaranteeing that businesses have full benefit when going ahead.

We had a requirement from customer to send different file formats (.pdf, .txt, .zip, .pptx etc) to Azure Blob storage via BizTalk server 2013 R2.

For sending the customer files to Azure Blob storage we used  WCF-WebHttp adapter along with the inbuild azureStorageBehaviour. This behaviour will help us to connect to Azure Blob storage.

Let’s walk through the various steps carried out during the process.

Create a Storage Account in Azure and a container – ‘biztalkfilescontainer’

Scenario1.JPG

Configuration of  your BizTalk send port using WCF-WebHttp adapter and azureStorageBehaviour

  • Use the HTTP URI for your Blob Storage
  • Set HTTP URL method and URL mapping
  • Variable mapping to get Filename from the context using file Property namespace

Scenario2.JPG

  • Behaviour Configuration – Go to behaviour on your send port properties and select tab – Behaviour. Add extension “azureStorageBehaviour”.

Scenario3.JPG

  • Specify azureAccountKey & azureAccountName ( You can get the Access Keys and Storage Account Name from the Azure Portal ).

Scenario4.JPG

  • A receive port where the customer dropped all the necessary files. Our above send port subscribed to this receive port.
    • Filter = BTS.ReceivePortName

Testing  – 

While sending the customer files to Azure Blob storage we noticed that that in Azure the file was getting saved into folder structure because of the Received filed name context property “C:\Users\biztalk\CustomerFiles\Incoming\”.

Scenario5

Scenario5_1

In order to avoid this folder structure in Azure and just save the file name in container we had to write a pipeline component to extract only the file name from the context. The files were later saved as below in Azure blob storage container.

Scenario6

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s