The core of my task is to do some data validation. I've set up a process which works and validates on ~30 records just fine, although I noticed when building it it was a little slow (29 fields & I want to check each field for correct values/structure and then append to a list where there are errors).
The reality is the end user will be uploading 5,000+ records at a time, and a server action isn't going to cut it (could take 10 minutes). So i decided to break it down & use a process. This now works, but I didn't realise there was a 5 minute timeout on these, and I'm bumping into that.
So reading the guidance, it suggests I need to use a timer.
https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/BPT_-_Automatic_Activities_Timeout
Before I go off an research how to use these - is this likely to do the job for me?
My current approach is:
> User uploads a CSV ~5k records through a client action
> Client action calls server action
> Server action writes the records into a temporary table.
> Final step of server action creates a record and triggers a Process
> Process calls second server action (which requires one input variable) and loops through temporary table doing data validation against a structure
> End of second server action writes to table detailing success/failure of process & cleans out temporary table.
Assuming timers will get me round the timeout issue;
Would appreciate any advice before I go off down another path which may again not solve my problem...
Hi,
Yes timer can achieve this but its recommended to have timeout set on timer as well (around 30 mins but lower timeout is also acceptable). Below is what I would suggest.
Regards.
You can also check https://www.outsystems.com/learn/courses/43/master-class-on-best-practices-and-timers/, it a good resource for learning some best practices.
Hi Steve.
Timers can run for longer than 20 minutes. That is the default.
I would cut it even more.
1. User uploads a file. It is stored as binary. Timer is awaken.
2. Timer picks binary and stores as temporary records.Start Process.
3. Process asks for variable. Awakes timer #2.
3. Second timer validates data and creates final records.
This is clearer and easier to debug.