NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect skipped steps using a callback

Hi all,

 

At execution time I need to detect when a step is skipped (for sequence analysis purpose and progression % calculus). This detection should be trapped for any sequence running my personnalized processModel.

In my case a step can only be skipped because its precondition failed.

I noticed that neither ProcessModelPostStep or ProcessModelPreStep callbacks are NOT fired for skipped steps... So do you have any idea to detect these skipped steps ?

 

Thanks.

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 1 of 3
(4,291 Views)

This is an interesting question.  You can look at the status of any step by using:

Step.Result.Status

 

Knowing this we could in essense use a SequenceFilePreStep callback and check the status of the previous step.

 

Runstate.Caller.Sequence.GetStep(runstate.CallingStep.StepIndex - 1, RunState.CallingStep.StepGroup).ResultStatus

 

Something like that?  You may have to use some sort of logic to determine if the step wasn't the first one in the step group?

Just a thought

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(4,284 Views)

Hi Jiggawax,

 

Thank you for your answer.

I guess I'll have to check if the step associated to the callback trigger is the first  non-skipped step in my sequence and update my actions according to this result...Not really efficient !

Moreover, doing some actions when a skipped steps is 'executed' could be necessary. I would have been great to have something like a 'ProcessModelCallback SkippedStep' or even better an option to allow 'ProcessModelCallback Pre/PostStep' to be fired or not for skipped steps.

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 3 of 3
(4,267 Views)