I try to jump from a step in the Cleanup-group to a specific step in Setup-group at the same sequence.
I do this with a "Statement" includes the expression "RunState.StepGroup = "Setup", RunState.NextStepIndex = 1". This expression do exactly what I want in an easy example in which I test this expression before I add this step in my Test-Sequence.
I copied this step into my Test-Sequence.... but now, it jumps only to the first step in Cleanup-group .
I'm really confused now...
It should work. A step with an expression like this is not a candidate for introducing these kind of issues.
I see one possible reason for your scenario: If a step has reported an error and your sequence now runs Cleanup because the execution is set to "Run Cleanup on Error", there will be almost no chance to go back to the step group Setup and execute and step there.
Thanks for your analysis, I checked your idea but the option in "Station Options - Execution - Immediately Goto Cleanup on ..." is unchecked.
I have chosen another way to jump back to the setup-group. This one is not really nice, but it works fine.
Now I check in cleanup group over a flaf if an specified error is occured (USB connection to DUT lost). If it's true, I call a SubSequence (repeat handler). I leace the repeat handler with a sequence call to the MainSequence which starts at step 0.
Is this way ok?