I am facing some problem while trying to exit from all thread execution.
The scenario is as mentioned below:
1. From the main procedure, start 4 different threads, each of which calls a different sub-procedure
2. While executing the procedure, if any one of the thread sets a particular variable to FAIL (FAIL cases), then we need to ABORT the execution of the other threads also and continue the execution of steps below.
3. After this step, there is a Waitthread step which waits until all the 4 threads complete.(which we reuqire in PASS case scenario)
I have handled the 'abort' from all threads by giving an 'exit' statement in the sub-procedure. (The behavior of exit command is to exit from the current procedure and exit all other threads and continue execution of the next step).
In the current scenario, I see that the procedure which we entered in each thread is being exit and also every thread exits if one of the procedures set the variable to FAIL. BUT, since, I have a waitthread statement (mandatorily required in PASS cases) in the main procedure; On Threadexit of such a waitthread statement, the main procedure also gets exit which is not as per the requirement.
I have tried changing the event "onThreadExit" to execute "continue" statement, but still it could not avoid exitting from the main procedure.
Can you please let me know an alternative way to handle exit from the sub-proc ensuring other threads exit, but we continue execution of the steps in the main procedure?