Execution.InitTerminationMonitor

Syntax

Execution.InitTerminationMonitor

Return Value

PropertyObject

A property object that contains data the Execution.GetTerminationMonitorStatus method uses to determine whether a particular execution is terminating and, therefore, whether a particular operation (that is, a code module of a step within the execution) needs to abort what it is doing.

Note Do not directly access the data in this property object.

Purpose

Creates the initial termination monitor data property object the Execution.GetTerminationMonitorStatus method uses.

Remarks

Only call this method once, when you want to begin monitoring the status of the execution.

Use this method with the Execution.GetTerminationMonitorStatus method to monitor the state of an execution when performing a task inside of a step that takes a long time or requires user input to continue, such as launching a dialog box. When performing such a task, first call this method and hold on to the PropertyObject it returns. Then, while performing the task or inside of the message processing loop, periodically call the Execution.GetTerminationMonitorStatus method and pass the PropertyObject this method returns. If the method returns True , the execution is terminating and you should abort the task you are performing.

Use the Execution.InitTerminationMonitor and Execution.GetTerminationMonitorStatus methods to monitor whether the execution receives a request to terminate or abort the execution. The monitor only recognizes requests to terminate or abort while monitoring, so a code module that executes in a Cleanup step group of an already terminating execution monitors for a subsequent request to terminate the step or abort the execution. Use the Execution.GetStates method to determine the execution state of the code module.

See Also

Execution.GetStates

Execution.GetTerminationMonitorStatus

PropertyObject