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

Senior Instructor

Latest Articles

‍What’s new in OutSystems Developer Cloud

‍What’s new in OutSystems Developer Cloud

Have you heard about the OutSystems Developer Cloud and want to know more about what's new and what the big benefits are? Then this article is for you!

Tech Bites - Should we validate form data on server-side?

Should we validate form data on server-side

When including forms in applications, developers often wonder if they need to re-validate data on the server side after having checked it on the client. Why go to the trouble of checking the data twice?

Tech Bites
The Top 5 Mistakes Handling Asynchronous Data In Outsystems Reactive Apps And How To Avoid Them

The Top 5 Mistakes Handling Asynchronous Data In Outsystems Reactive Apps

When developing an OutSystems reactive web app, you would expect to display data quickly, but it doesn't always happen. Do you know why? We'll explore the reasons and how to tackle them.