This class implements a framework for providing administrators with status and control
of long-running tasks/utilities/operations that set to run in the background. These
are typically (but not necessarily) tasks that are started interactively, but run in
the background because they may run for a long time (e.g. some database management
utilities). Note that this framework is separate from the "Task Manager" frameword
which can be used to schedule activity.
There are subclasses for each type of operation that uses this infrastructure and
objects of those subclasses represent instances that are running or have run since
the system started up.
To use this framework for progress and control of a background task, you simply
open or query objects the objects through this class or the relevant subclass.
The properties represent a snapshot of the state and progress of the task.
You can periodically check for changes by rerunning the query or reloading the object
via standard object interfaces %OpenId() and %Reload().
RunningState contains information about whether the task is
running or not (as of the time the object was last loaded or queried).
Progress information may be available via ProgressCurrent,
ProgressTotal and ProgressUnits. When complete,
the %Status is available in FinalStatus. Subclasses may expose
other properties that are germain to that particular type of operation.
Users should not modify properties or save these objects.
To start a job running the task in the background, you can use class method
Start() in the desired subclass. The arguments are unique to each
subclass. Start() returns an oref to use for monitor and control.
final method Cancel() as %Status [ Language = objectscript ]
final method Pause() as %Status [ Language = objectscript ]
final method Resume() as %Status [ Language = objectscript ]
Request to resume from pause.
final classmethod Start(args...) as %ObjectHandle [ Language = objectscript ]
Starts this task in the background and returns on oref for monitoring and control.
Returns null on error, with error status available in %objlasterror.
The meaning of the arguments are specific to each subclass.
SQL Query: SELECT ID,StartTime,DisplayType,Database,RunningState,HasEnded,ProgressTotal,ProgressCurrent
ORDER BY ID
All database-oriented tasks. This currently includes SYS.Database.BackgroundFileCompact and SYS.Database.BackgroundFileCompact
SQL Query: SELECT %ID,StartTime,Class,DisplayType,Namespace,RunningState,HasEnded,FinalStatus,