Hi,
When an interactive automation is left 'unattended' by a user (=dialog box open but no user input for xx minutes), the script will be 'killed' rather than terminating normally.
As a result not the entire script will be handled (e.g. no report on user interaction will be sent).
Is it possible to catch the expiry time and have the script terminated in a 'regular way' so that all remaining lines can be executed prior to ending in a 'normal' way ?
Hi Hans,
The script timeout time is controlled by the Timeout property which you can retrieve and set a new value to.
When it sets of it will throw a ScriptTimeoutException | DataMiner Docs which aborts the script.
Even if you try to catch this exception any subsequent call to any engine method will result in a failure as the script execution has already been marked as aborted.
If you do not need to use any method from the engine object you may try to catch the exception and do some logic in the catch clause (untested) otherwise I do not believe it will be possible.
As an alternative you can try to use the Method KeepAlive | DataMiner Docs to reset the elapsed time but it will only work if the user is taking a long time not if the user just leaves the script unattended.
I’m not sure if it’s the Timeout that’s the issue. Interactive scripts with timeout set to 20 min+ will still fail if the user doesn’t do anything for just 10 min after launching the script. Also the error that you get when this happens state that ‘Show UI Failed’, which is different from the ‘Script timed out’ you usually get.
Hi Robin, I personally have not encountered such issue but I tend to use the KeepAlive method for long running scripts and so far it has worked.
Thanks a lot for the clear answer.