Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
arne eggert
2
Views
2
Comments
Parallel execution
Question
Hi,
i have a screen action (importaction), which imports Records from an excelfile (with ExcelToRecordList) out. on the webscreen exist an progressbar. every time when an record was created the progressbar is updated. thats works, but now i have to implement a cancelbutton, which stops the importaction.how can I do that? i did it with a normal screen action, which is associated with the canclebutton, but the action will executed after the importaction.
thanks for help
arne
João Rosado
Staff
Hi Arne,
Unfortunatly like you observed all requests are serialized. So a "cancel" request will only be executed after the request processing the excel is finished.
Don't see a way to get both requirements done, and even without a progress bar it would be hard to implement the cancel (since you would need to make it on a separate request using a Process or a Timer).
Anyway just out of curiosity, how long and what quantity of records are we talking about? Importing a excel file into tables (even with processing) should be a fast operation. Make sure the "progress" report is not taking longer than the import process itself.
Regards,
João Rosado
Justin James
MVP
This is quite possible. As Joao suggests, a Timer is the trick. Push the data into an entity that acts as a processing queue, and give those records a many-to-one relationship to a master "batch" record.
What you want to do, is to have the timer iterate through the list of work to be done, and on each iteration, check for a "cancel" to be put into the master "batch" record. To exit out of the iterations and act as a proper "cancel", raise an exception. That exception will abort the transaction and exit the system, and provide an audit trail explaining why it did not work. Have your initial query filter on that cancel flag too, so further runs of the Timer do not try to re-run the batch. You can also log messages back to the master "batch" record that explain things like errors.
J.Ja
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...