NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

sequencefilepoststepfailure callback active only within main sequence

Hi!

 

I want to end testing if any failure occures. So I have inserted into the SequenceFilePostStepFailure callback (in the client file) a statement which goes like this: "RunState.Caller.RunState.GotoCleanup=true"; However, I dont want this behavior if a failure occures outside the main sequence, because I have overridden PostUUT callback with some code and here I don't want to go to the cleanup step group. Code outside the main sequence should always be executed completely also if failures occur.

 

A simple way would be to set a fileGlobal which is true only inside the main sequence. But I prefer to avoid this FileGlobal and use inside the SequenceFilePostStepFailure callback the RunState to determine if the caller is a descendent of the main sequence. Unfortunately inside the parameters of the callback only the step information is visible but not the call stack.

 

w.

 

 

 

 

0 Kudos
Message 1 of 3
(2,958 Views)

Try using the expression:

 

'RunState.Caller.Sequence.Name': in the SequenceFilePostStepFailure callback.

 

Thanks,

 

PH

0 Kudos
Message 2 of 3
(2,942 Views)

 

Thanks for replying, Teds.

 

However, your proposal does not fullfill my intention because I do not want to use a list of sequence names to determine, if

I am in the MainSequence or not. No problem, in the meanwhile I found a perfect solution. I insert a precondition on the

'...GotoCleanup = true' statement:    NameOf(RunState.Main.RunState.Sequence)  == "MainSequence" 

 

RunState.Main contains the runstate of the least nested sequence which is not in the process model. So, within the MainSequence

(or nested sequence calls) it contains the RunState of the MainSequence. Within PostUUT (or nested ... ) it contains the runstate of PostUUT.

And so on.

 

So I have now a solution which is compact and does not rely on additional variables to be created.

 

bye

 w.

 

0 Kudos
Message 3 of 3
(2,939 Views)