03-25-2020 02:30 PM
Hi - i want to replace the fail banner in the sequential model with the Failed Step report text, some kind of LabVIEW dialog. Is there an easy way to grab that from within the process model? I can access the text in the subsequence of main with Locals.ResultList[GetNumElements( Locals.ResultList)-1].ReportText) and copy to a local or a parameter, but I can't seem to pass it to the Process model. I could use a Station Global, but that's not right. Using parameters to call the subsequence means I have to do that all over my test. And, even then I have the variable at the main sequence level and not the model.
This can't be an unusual situation. Am I over complicating it?
TS 2017
LV 2018
W10
Solved! Go to Solution.
03-26-2020 07:15 AM
If it's me, I am using the PostUUT callback from the model, but then I'm making a custom window with text that's populated from FileGlobals.ReportText (or whatever you want to name it). I populate FileGlobals.ReportText in SequenceFilePostStepFailure and get the step's report text in that callback.
03-26-2020 10:08 AM
Thanks so much - one forgets all those handy engine callbacks that don't show up on the list until you add them. So I can find the report text in the process model which I can easily add to my fail dialog, but it is indexed as in Parameters.Result.TS.SequenceCall.ResultList[0].TS.SequenceCall.ResultList[1].ReportText. Is there a way to obtain the indicies I am interested in (i.e. the failing step index) of the result list from within the process model callback? Thanks again
03-26-2020 10:15 AM
To get the ReportText in SequenceFilePostStepFailure, I would use Parameters.Step.Result.ReportText
03-26-2020 10:54 AM
Thanks but unfortunately that doesn't apply to the sub test (see attached) unless I can set the upper level report text to the subtest report text in my test sequence? But that would make everybody who uses the model have to add code to their test sequences. I am hoping to show "Test 2 failed" in the fail dialog in this case for example. Thx!
03-26-2020 11:26 AM
If the step fails, then all parent sequences will also fail.
Let's say that you want to change the ReportText for the originating call in MainSequence, but the failing step is embedded in a subsequence (or many).
In SequenceFilePostStepFailure, you could check if the step type is not a sequence call, something like Parameters.Step.StepType.Name!="SequenceCall". If that's true, save the report text for that step in a fileglobal.
Then, when NameOf(RunState.Caller.RunState.Sequence)=="MainSequence", you can set that reporttext to the earlier FileGlobal.
You might have to play around with this a little more, but I think I'm close to what you need.
03-26-2020 12:04 PM
Cool thanks for your help. Looks like there are a few ways to do this. That sequencefilestepfailure callback is key
03-26-2020 02:15 PM
This did the trick