02-01-2012 12:12 PM
The TestStand Reference Manual states on page A-4:
"In addition to using a primary, or parent, process model file, you can use a secondary, or child, process model file to encapsulate specific functionality, such as report generation."
A "secondary process model" file is also mentioned on page 10-3:
"A primary process model file can directly call model callback sequences in a secondary process model file. At run time, if the client sequence file of the primary sequence file implements a callback defined in the secondary process model file, TestStand invokes the callback sequence in the client sequence file, even if the primary process model file does not define the callback. You must add a copy of the callback sequence to the primary model file for the callback to appear in the Sequence File Callbacks dialog box for the client sequence file."
I cannot find any additional information on the secondary process model.
Thanks!
Solved! Go to Solution.
02-01-2012 01:47 PM
reportgen_xml.seq is a secondary model for the BatchModel.seq. If you look in the reportgen_XXX.seq files you will see a callback in there.
That would be the best example I can think of off the top of my head.
02-01-2012 02:52 PM
@~jiggawax~ wrote:
reportgen_xml.seq is a secondary model for the BatchModel.seq. If you look in the reportgen_XXX.seq files you will see a callback in there.
That would be the best example I can think of off the top of my head.
Thanks jiggawax, I took a look at the report generation sequences. It appears that "child" is a more appropriate term so I will use that from now on.
It appears that a child process model is a sequence file of type "Model" from which a sequence is called from another process model sequence.
1. How does one create/designate a secondary/child process model?
It appears this is done by creation of a callback sequence in a "child" sequence file AND the "parent sequence file". Is this correct?
2. Is the parent sequence file callback simply acting as a pointer to the child sequence file callback?
3. How many levels of "child process models" can one create? Is it possible to create a "third process model"?
Thanks
02-01-2012 03:34 PM
1. How does one create/designate a secondary/child process model?
It appears this is done by creation of a callback sequence in a "child" sequence file AND the "parent sequence file". Is this correct?
To create a process model in general you would open a sequence file and go to Edit>>Sequence File Properties. Then on the Advanced tab change the Type to Model. For it to become a secondary/child process model you would make a sequence call to it from the primary process model. For instance the SequentialModel.seq at one point makes a call to ProcessOTFStepResult in either of the Engine callbacks in there. Then the ProcessOTFStepResult sequence makes a call to PutOneResultInReport (if you are using the reportgen_txt.seq). Then the PutOneResultInReport sequence makes a call to ModifyReportEntry (which is a callback). However, if I have a client sequence file I would like to intercept that result and do some modifications. So I would override that callback. But since ProcessOTFStepResult and PutOneResultInReport are not in the process model there needs to be a mechanism for me to override that from the client. This is because reportgen_txt.seq has different behavior than reportgen_html.seq or reportgen_xml.seq. So it doesn't make sense to put everything in the process model. Otherwise, your PM would be ridiculously large. But you also need to make a copy of the callback in the PM so the client can see it.
2. Is the parent sequence file callback simply acting as a pointer to the child sequence file callback? Yes and No. It depends on if it's invoked in the secondary PM or in the primary PM.
3. How many levels of "child process models" can one create? Is it possible to create a "third process model"? I just tested this out and it looks like you can. But you do not have to put the callback in your secondary one. Just the third layer and primary PM.
02-02-2012 07:52 AM
Thanks for sharing your knowledge, this information has been very helpful.