11-04-2010 03:32 PM
Hi,
I have a callback sequence (postStepsequence) in which i check the status of a boolean (is name is titi) after each step. If titi is false, the callback don't do anything and if it's True i'd like to run the mainsequence cleanUp.
So i have writted RunSate.Caller.GotoCleanUp = titi in my callback.
I have a mainsequence who call a subsequence.
If titi (the boolean) becomes true when the execution is running the mainsequence, the execution goes directly in the mainsequence's cleanUp, but if titi becomes true when the execution is running the subsequence, the execution goes in the subsequence's cleanUp.
How can go directly in the mainsequence wherever the execution is running (subsequence, sub-subsequence....)?
Thank you
11-04-2010 08:15 PM
Why not just call RunState.Execution.Terminate()?
11-05-2010 06:38 AM
Terminate does execute all cleanup stepgroups in the callstack up to the MainSequence. This is definetly the recommended way, so nothing wrong with the suggestion/recommendation here from asbo.
Nevertheless, you can directly jump into the cleanup stepgroup of your MainSequence. "All" you have to do is to jump up to the caller in the whole callstack until you reach MainSequence. So this jumping depends on the depth of that callstack.
hope this helps,
Norbert
11-05-2010 07:56 AM
Thank you for your responses.
I have tried asbo way to do, it has worked.
"All" you have to do is to jump up to the caller in the whole callstack until you reach MainSequence. So this jumping depends on the depth of that callstack.
Norbert, how can do that
RunState.caller.caller.(....).GotocleanUp = true
11-05-2010 08:33 AM
This is not sufficient. If you do want to skip all other cleanup stepgroups in the callstack, you have to "exit" the level of callstack without running into the cleanup.
Please note that this is not really recommended.
You can do this by stating
RunState.StepGroup = "Cleanup", RunState.NextStepIndex = -1
for each level of the callstack you want to jump out without execution of the cleanup (and rest of main/setup).
Norbert
11-08-2010 07:14 AM
Thank you for all your reponses.