09-06-2022 10:33 AM
Hello,
I'm working with a custom operator interface and a custom process model in my application, but I don't really have full control over every aspect of the operator interface source code. So my problem statement is that I would like some of my OI plugins to start fresh with default values if the operator choses a New Test Execution (which is really like clicking Execute-> Single Pass in the sequence editor) but I would like to retain certain values in the plugin if they chose the Restart Execution (which is really like clicking Execute->Restart in the sequence editor). I've been searching and searching for a way that my process model might be able to key off of a parameter or something of that sort to know if the current execution is the result of a new execution or a restart. Has anyone ever done this?
Thanks!
Solved! Go to Solution.
09-06-2022 07:01 PM
You could take advantage of the Execution being a property object to attach a flag to it (see attached sequence). Note that I didn't store the flag under Execution.RuntimeVariables because that is cleared upon completion.
Alternatively, you could just look at the value of Execution.Id. If it is the same as before, the execution was restarted. Otherwise it will be different.
09-07-2022 06:35 AM
Thanks a ton James! The Execution.ID is exactly what I was looking for and works perfectly for my needs. I was able to set an expression in my PreUUT Process Model Callback that sends the Execution.ID to my plugin and I confirmed that if I start a new test it increments that value every time, but if I press the Restart button it stays the same. Brilliant!