NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SequenceFilePostStepRuntimeError

Hi,

I would like to use the SequenceFilePostStepRuntimeError callback to handle any step errors in my sequence. After I handle the error I would like the point of execution to move to the Cleanup phase of the sequence who's step had the error.

The handler consists of one step, an expression. To get the execution to move to the Cleanup of the calling sequence (not the SequenceFilePostStepRuntimeError Cleanup) I am using a custom PostAction

On Condition True Goto Destination

My destination expression is

RunState.Caller.RunState.Sequence.Cleanup[0]

I have also tried

RunState.CallingStep.RunState.Sequence.Cleanup[0]

In both cases the MainSequence of the orignal sequence that had the error continues to execute after calling the
SequenceFilePostStepRuntimeError callback, which is not what I want.

Does anyone know what the correct expression is, or if this is possible?

The attachment is TS3.1

Thanks,FAS
0 Kudos
Message 1 of 3
(3,853 Views)
Hi,

You will need to do a few things to achieve what you are after.

You will need to set the StepGroup to the Cleanup:
RunState.Caller.RunState.StepGroup = "Cleanup"

Then the Step index to point to the beginning of the group:
RunState.Caller.RunState.StepIndex = -1 and RunState.Caller.RunState.NextStepIndex = -1.

Just add these expression in your expression call step and set the post action to normal.

(As an example look at the PostStepFailureCallback and what it does to achieve repeating the same test)

Hope this helps.
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,849 Views)
Thanks Ray,

One nit, it seemed like
RunState.Caller.RunState.StepGroup = "Cleanup"
should be
RunState.Caller.RunState.StepGroup = "< Cleanup>"
this might simply be the HTML input mode on this board, I know it bugs me a lot!!

If it is not in the angle bracket it goes back to a higher calling level.

Regards,
FAS

Message Edited by Support on 04-06-2005 03:35 PM

0 Kudos
Message 3 of 3
(3,837 Views)