FREE OutSystems Workshops - Build an OutSystems App in 1 hour | ENROLL NOW

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

Tech Bites - How to use Screen templates

How to use Screen templates

Did you know that the OutSystems Platform has tens of screen templates to help you quickly put together your apps? Let me show you how you can use them.

Tech Bites
Tech Bites - Set timers to delete records

Set timers to delete records

In this tech bite, we will demonstrate how to set timers to delete records and use an online store as an example.

Tech Bites
Tech Bites - How to import data from an excel file

How to import data from an excel file

In this video, we’ll show you how to upload and store data from an excel file.

Tech Bites