Starting an Interactive Execution in an Application

You can start an interactive execution from an execution suspended at a breakpoint using the Thread.DoInteractiveExecution method or as a new execution using the Engine.NewExecution method.

Creating the InteractiveArgs Object

When you start an interactive execution, create an InteractiveArgs object and then pass it to the Thread.DoInteractiveExecution method or the Engine.NewExecution method. Use the InteractiveArgs object to specify which steps to run and whether and how the execution loops.

To determine whether and how the user of the application wants the execution to loop, use the dialog box that launches when you call the Engine.DisplayLoopOnStepsDialog method or write a custom dialog box to launch instead. Next, call the Engine.NewInteractiveArgs method to create the InteractiveArgs object. Set the InteractiveArgs.StepGroup, InteractiveArgs.LoopCount, and InteractiveArgs.StopExpression properties of the object as needed. You do not have to set the InteractiveArgs.LoopCount or InteractiveArgs.StopExpression properties if you do not want the interactive execution to loop. Finally, call the InteractiveArgs.AddStepIndex method for each step you want to run, passing the zero-based step index for each step. In an interactive execution, you can only run steps located in the same sequence and step group. You can then pass the InteractiveArgs object to the Engine.NewExecution method or the Thread.DoInteractiveExecution method.

Starting as a New Execution

Create a new interactive execution in the same manner as you would create a new execution to execute a specific sequence, but instead pass an InteractiveArgs parameter. Create an InteractiveArgs object and then pass it to the Engine.NewExecution method.

Starting From a Suspended Execution

If you are currently displaying an execution that is suspended at a breakpoint, you can start an interactive execution on steps in the current step group and in the current thread of the execution by calling the Engine.DoInteractiveExecution method on the current thread with an InteractiveArgs object.

Note You cannot start an interactive execution from a breakpoint in another interactive execution.