Parallel execution


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 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
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.

João Rosado
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.