From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Aborting and cleanup

Hello,
 
We have currently implemented a system that programmatically invokes sequence executions. These executions can be stopped in the middle, in which case we call "Execution.Abort". But we did not realize that Abort does not call any cleanup step groups. But "Execution.Terminate" does.
 
My questions is inspite of calling "Abort" is there any way for the sequence that is running to know that abort has been called and do some cleanup operation?
 
Thanks,
Harsha
0 Kudos
Message 1 of 2
(2,800 Views)
Hi Harsha,

You can get the current status of the execution by calling Execution.GetStates.  Although, I do not believe this will help any, because once abort is called, it finishes the current step that is executing then quits.  If you are needing to run your cleanup steps, no matter what the state the execution is, you need to call Terminate, instead of Abort.
0 Kudos
Message 2 of 2
(2,777 Views)