Streamlining data extraction and submission with sizes of the order of MBs using webMethods.io Integration
Tags: webmethods, integration, workflow, dataextraction
Published: 2023-04-04 14:50:11

---
title: Streamlining data extraction and submission with sizes of the order of MBs using webMethods.io Integration
published: true
date: 2023-03-24 08:18:02 UTC
tags: webmethods, integration, workflow, dataextraction
canonical_url: https://tech.forums.softwareag.com/t/streamlining-data-extraction-and-submission-with-sizes-of-the-order-of-mbs-using-webmethods-io-integration/276311
---

 

## Introduction

This article talks about the option to streamline the data extraction and submission with sizes of MB’s using [webMethods.io](http://webMethods.io) integration.

## Audience

It is assumed that readers of this article know how to create integrations on [webMethods.io](http://webMethods.io).

## Pre-requisite

To implement this use case, we have used the below third-party system.

1. Azure Blob storage acting as the source system.
2. Azure storage location as a temporary cloud location
3. SFTP server acting as an end system.

## Usecase

• Pulling or getting the data from third-party applications for example Azure blob storage, S3 bucket, or HTTP end points  
• Implement the business logic on flow service\workflow  
• Temporary store the data in cloud storage for example: SFTP location  
• Append the cloud storage.  
• Submit the data to the end system example uploading the files to the SFTP location.

## Implementation

[webMethods.io](http://webMethods.io) integration provides 2 options to process the data.

• When the developer is a citizen developer, and the business logic is not too complex then we can go with workflow approach.  
• When the business logic is too complex, and the size of incoming data is also on the higher side then we should prefer to implement the interfaces using the flow service

## Implementation using workflow.

To implement the above logic in the workflow we are going to use the out-of-the-box connectors available.  
Details for same

1. Getting the files from Azure blob storage location using Azure storage connector.
2. Implementing the business logic on the received file. In our case, we are looping for number of document array available in the source file
3. Temporarily saving the file on temp cloud storage using “Writefile” within the loop.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/6/8/687816fc5d873842365f4a2fe912dc537eeee781_2_690x377.png)](https://global.discourse-cdn.com/techcommunity/original/3X/6/8/687816fc5d873842365f4a2fe912dc537eeee781.png "image")

4.Keep appending the file using “File Append” within the loop
5.Extracting file from temporary storage location using “Read file”.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/0/4/049e3e8d4ee6f02c2aa6be2519958c3ae3474d86_2_690x161.png)](https://global.discourse-cdn.com/techcommunity/original/3X/0/4/049e3e8d4ee6f02c2aa6be2519958c3ae3474d86.png "image")

6.Upload the new files to the SFTP location with the dynamic name starting with workflowSamplefile concatenated with CurrentDateTime.  

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/a/5/a5de6690debdbdb65128288ad9a1d679ee8dae33_2_690x249.png)](https://global.discourse-cdn.com/techcommunity/original/3X/a/5/a5de6690debdbdb65128288ad9a1d679ee8dae33.png "image")

## Limitations

- We can handle the data when the incoming data size is not too big. For example, the average size near about 30-40 MB
- We can use the workflow when the business logic implementation is not too complex.

## Implementation using Flow service

To implement the same use case we can have two approaches when using the flow service.

**Approach 1: Using inbuilt memory to store the data temporarily.**

1. If we are not getting a high volume of data, then we can extract the data and store it within the memory.
2. In the below diagram we can see that we have received the file from Azure storage and looped on item.
3. In each loop we have implemented the business logic and appended to the document list.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/6/16e926c2305824ecd31b1846cd66781d6dcd087e_2_690x423.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/6/16e926c2305824ecd31b1846cd66781d6dcd087e.png "image")

4.Once all the data is appended in the memory then the data can be saved directly to the SFTP location.  

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/b/b/bb3402fcabda0f270398877ab74870b49e36a66c_2_459x499.png)](https://global.discourse-cdn.com/techcommunity/original/3X/b/b/bb3402fcabda0f270398877ab74870b49e36a66c.png "image")

**Approach 2: Using cloud storage location to store the data temporarily.**

**Overview**

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/7/171f7ce754fed3716d613b08a258dc96fd3d6116_2_690x272.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/7/171f7ce754fed3716d613b08a258dc96fd3d6116.png "image")

1. We can use this approach when we have the data size on a higher limit and when the business logic is too complex to implement on workflow.

2. Once the request comes into flow service, The incoming request is then converted into the appropriate format. In our case, we are pulling the data from the Azure blob storage location.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/0/9/09f593eab1084db61674b68ad8b247771637f396_2_690x223.png)](https://global.discourse-cdn.com/techcommunity/original/3X/0/9/09f593eab1084db61674b68ad8b247771637f396.png "image")

3.Loop is executed and data is extracted from the incoming request.

4.This extracted data is temporarily uploaded to some cloud storage location like Azure blob storage, S3 bucket, FTP location, etc. In my case, Azure blob storage is the temporary cloud storage location.  

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i8s2448akyna5j8x42w9.png)

5.Once all the data is extracted and uploaded in a temporary cloud location.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9rupc0efg84l27w9jf4.png)
6.All the data is fetched and then uploaded to the actual end system like SFTP location etc.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/1/6/1653ff5e2e1a0e3c79e133f9834a350c1b29c61d_2_690x308.png)](https://global.discourse-cdn.com/techcommunity/original/3X/1/6/1653ff5e2e1a0e3c79e133f9834a350c1b29c61d.png "image")

## Points to remember

When implementing this kind of use cases on integration platform we need to consider multiple aspects related to it for example:

1. what will be the payload frequency
2. What will be the overall load on the integration platform.
3. payload attributes that need to be logged for monitoring purposes
4. If the data size is quite high how we are sending it from one system to another

### Note

Attaching the flow service and workflow for reference purposes.  
Workflow: [export-fl3eab36510cb3966856c6dc-1679645629696.zip](https://tech.forums.softwareag.com/uploads/short-url/mGwPa4Ny8JIEUn2NxJiJJi1lQX9.zip) (77.4 KB)  
FlowServices:  
[ProcessingLargeDataInMemory.zip](https://tech.forums.softwareag.com/uploads/short-url/cTROX225WsPAIoR7FZRVM4wmPZp.zip) (12.4 KB)  
[ProcessingBulkData.zip](https://tech.forums.softwareag.com/uploads/short-url/w5jIzdpyKj4gtXTAds5OGzEZLuf.zip) (15.3 KB)  
[UploadBulkDataToSFTP.zip](https://tech.forums.softwareag.com/uploads/short-url/8QBnSRWsraoRtfz3tduk3eH0Fmn.zip) (9.0 KB)  
[UploadBulkData.zip](https://tech.forums.softwareag.com/uploads/short-url/t3LrXTMYLUZhTSIPx8HlYXwG3Qa.zip) (9.2 KB)  
[GetBulkData.zip](https://tech.forums.softwareag.com/uploads/short-url/x0PUT8cZJN0Q2IHefylAbXJwLjc.zip) (8.9 KB)


[Read full topic](https://tech.forums.softwareag.com/t/streamlining-data-extraction-and-submission-with-sizes-of-the-order-of-mbs-using-webmethods-io-integration/276311)