03-07-2025 10:41 AM
Hello,
Until now, i was using SequencialModel and #NoValidation(RunState.Main.RunState.Caller.Locals.StartDate.ShortText) to get the string date and time, for report and so on.
Now, i need to use BatchModel, and it looks like Locals.StartDate is no longer there.
Doesn anybody know another variable that contain this information?
Thank you in advance!
Solved! Go to Solution.
03-07-2025 11:09 AM
I found in the model, the place where the date and time are saved, but i don´t understand how to access these variables from the outside
I need this time, because it is used in some subsequences to always find the path to save data on disk and so on.
This is my structure
I would like to avoid to get time stamps in the Main sequence, because there are many main sequences which i would need to change.
Thanks!
03-07-2025 04:19 PM - edited 03-07-2025 04:19 PM
When using Batch, this data is stored in RunState.Root.Parameters.TestSocket.StartDate.ShortText.
Please note it is better to use RunState.Root to access the Process Model that is running the test.
In Sequential it is: RunState.Root.Locals.StartDate.ShortText
No matter how big your call stack is, Root will be the process model entry point SequenceContext that contains the StartDate.
03-10-2025 03:32 AM
Thanks a lot for the solution and for your fast response!
It worked, with a small change: RunState.Root.Parameters.TestSocket.StartDate.Text instead of RunState.Root.Parameters.TestSocket.StartDate.ShortText.
Best regards,
Marian
03-10-2025 03:56 AM
Just a correction to my previous post:
RunState.Root.Parameters.TestSocket.StartDate.ShortText works.