08-26-2016 11:27 AM - edited 08-26-2016 11:50 AM
Hi,
I have a test sequence which uses Batch Synchronisation in the following way:
1. Entering Batch Serial Section
2. Enter Batch One Thread Only Section
3. Set Temperature
4. Exit Batch One Thread Only Section
5. Test
6. Exit Batch Serial Section
I also use SequenceFilePostStepRuntimeError callback in the way that when error occurs ProcessCleanup callback is executed.
Now I want to know how to properly exit batch synchronisation section eg when error occured in step 3 or in step 5. I tried to access those steps ResultStatus properties but without any success 😞 (I mean they were always empty). I used: RunState.SequenceFile.GetSequenceByName("MainSequence").GetStepByUniqueId("ID#:wkly0AIqzUWmRLZ/hRtGVC" /* Enter One Thread Only (Low_Temp_Setup) */).ResultStatus
With status information I could create preconditions when to run which "exit steps".
Result recoding is disabled.
So what is the recommendation for emergency synchronisation exit strategy?
Solved! Go to Solution.
08-26-2016 01:59 PM
Hi bienieck,
From SequenceFilePostStepRuntimeError callback, you can get the Result.Status of a step from the MainSequence using the property: RunState.Main.RunState.Sequence.Main["<STEP NAME>"].Result.Status
SequenceFilePostStepRuntimeError also includes a reference to the Step that produced the error, so you can get information from it via Parameters.Step
From the MainSequence, you can get the Result.Status of any step in the sequence using the property: RunState.Sequence.Main["<STEP NAME>"].Result.Status
RunState.SequenceFile is a reference to the on-disk copy of the sequence file rather than the run-time copy, so it does not have access to run-time values.
08-26-2016 03:27 PM
09-05-2016 08:32 AM
I decided that I will not exit synchronisation section explicitly in cleanup. In case of run time error, post step runtime error callback just terminates all. Process cleanup is executed anyway so proper cleanup is performed there 🙂
It works 🙂