12-07-2018 05:51 AM
Hi,
I need to get the Testsocket Index inside of a called Sequence (called as new execution with the sequential model). It seems that this variable: RunState.Testsocket.MyIndex is filled in this case with 0 and the count with 1. In the calling sequence these values are filled correctly.
I also tested it with the parallel model (and the same sequence) and the result was 4 new executions, so instead of 4, I now have 4x4 🙂 .....
If I do not use a process modell the reporting is not triggered (at least that's my understanding).
Is there any way how to get the testsocket index of the caller (like RunState.Engine.....caller.getTestsocket.MyIndex() ??)
Otherwise I need to work with parameters and this means a complete new approach (different Syntax, different way to meassure execution time, etc...)
Thanks for your Help
Best Regards
Matthias
Solved! Go to Solution.
12-13-2018 11:21 AM
Hi Matthias,
When you call a step in a new execution, you can store back an object reference to the new execution:
So, you first create a variable of type Object Reference to hold this reference. Then, in the post expression for the sequence call, you can attach a new attribute to the execution object that contains the caller's socket index. In order for this to work, you have to explicitly cast the new execution object to a Property Object.
Then, just use an expression to fetch that attribute into a convenient variable inside the new execution (again, you need to explicitly cast to a property object here to leverage the attributes).
You can find a simple example that just reports out the parent socket in a message popup attached to this post.