07-14-2005 08:00 AM
07-15-2005 04:57 PM
07-20-2005 12:15 PM
Peter -
I cannot think of why this would occur. Clearly it appears that you can ignore this error for now, but it would be nice to know why. When this occurs, do you see the status of the steps above the Unlock in the listview of the execution? If yes, what is the status of the Lock step and did any after it execute. Can you look at the Locals.ResultList to see the step statuses?
07-20-2005 01:32 PM
07-20-2005 01:39 PM
07-20-2005 04:36 PM
Peter -
I have been unable to reproduce the error. I have attached the automated sequence that I used to attempt to reproduce the problem. If you have time, please try it. Do you have any other ideas as to what is unique about your situation.
07-21-2005 07:59 AM - edited 07-21-2005 07:59 AM
Message Edited by Capt. Jack on 07-21-2005 08:02 AM
07-21-2005 02:44 PM
Peter and Jack -
The issue that you are seeing is related to the double termination of an execution. To prevent the double termination, you could only call Execution.Terminate if a call to Execution.GetStates(runState, termState) returns ExecTermState_Normal for the termState paramter.
Now why are you seeing this behavior with double terminate. The logic in the engine says that if a terminating sequence calls another sequence, the engine executes all the steps in the called sequence even though the caller is terminating. We do this to support ia sequence call step in a cleanup group.
In your case, when you terminate a step, the context for that step is marked as terminating. The engine now attempts to complete the execution of that step by finalizing the result. Since you are using a PostStepResultCallback, the engine calls the callback sequence. The engine plans to call all the steps in the callback sequence. Now while executing the Lock step, a second terminate occurs. The logic in the step sees the new termination and does not get the lock. The engine disregards the termination because the caller of the callback is already terminating, so it continues to execute all the steps in the callback.
We have to explore whether we should be honoring the second termination in the callback sequence or not. Some question whether we should support double termination in general, but it is already partially supported in the Execution.InitTerminationMonitor and Execution.GetTerminationMonitorStatus functions. If we make a change in this behavior, it will have to be in a future version.
Thanks for reporting this behavior to us. Hopefully now that you understand the issue better, you will feel comfortable with the workarounds that I suggested.
07-22-2005 10:06 AM