Tech Bites - How to process data with Light BPT

< Back to Blog

Synchronously uploading and processing data sometimes leads to a timeout, as we see in the following scenario.

After uploading the file, nothing happens for a while, and eventually, the application times out. We could solve this using different approaches, but we will show how to use Light BPT to process large amounts of data in this video.

To implement this solution, we use an entity to store the uploaded data precisely as it comes from the excel file; we call it raw data. The records will be created synchronously after the user uploads the file and clicks the button. 

Then, when the data is processed, it will be stored in the Customer and the Contract entities according to the process requirements.

The way data is processed is defined in a server action similar to the one used in the synchronous version. This action receives the raw data, creates the customer, and then its contracts, and in the end, deletes the raw data. 

So let’s create the process: In the Processes layer, create a new process, name it and provide a “detailed” description. 

After that, the Launch On property needs to be set: this is where we define what wakes up the process, which means that every time a new customer is created in the Raw Data entity, this process will be executed. 

Inside the process, we will use an automatic activity. Double-click it to implement it just like any other OutSystems action.

Inside we will use the previously created server action to process one customer’s raw data. 

Notice that the Raw data identifier is passed to this action by the process. The process has access to that Id since creating a raw record triggers it.

Let’s publish and test it.

Awesome, it’s working!

We can refresh the screen and see the data that is already being created by the processes that are executing. 

Just one final thing, to activate light BPT execution in OutSystems, it’s necessary to head over to the service center and enable the execution of lightweight BPT by ticking the checkbox and clicking apply.

Have fun building Light BPT.


Turn Up Academy

Apply to our Turn Up Boot Camp

AND BECOME THE NEXT OUTSYSTEMS CERTIFIED DEVELOPER
(
Senior Instructor
)

Latest Articles

How to handle timeouts in OutSystems

How to handle timeouts in OutSystems

Join our instructor and OutSystems Champion Cláudia for a step-by-step tutorial on how to troubleshoot timeout issues in the OutSystems platform.

DevZone
How to download Excel files in OutSystems

How to download Excel files in OutSystems

Learn how to download Excel files using the OutSystems platform in this simple tutorial!

DevZone
Mastering Email Integration with OutSystems: A Step-by-Step Guide

Mastering Email Integration with OutSystems

In OutSystems Reactive Web Applications, we can configure the Service Center and implement logic in the Service Studio to send emails to our peers or contacts. Follow this step-by-step guide to learn how to!

DevZone