class %SYS.Task.Definition extends %RegisteredObject
This class defines a task that can be executed by the Task Manager.
To create a new task, create a subclass and override the OnTask method.
All public properties whose name does not start with a "%" are treated as user-configurable "settings" for this task.
It can take one of the following values:
|0: NoValidate||Perform no automatic property validation.|
|1: ValidateOnSet||Perform validation (call the property's ..IsValid method) every time an attribute value is set.|
|2: ValidateOnSave||Perform property validation (in the %ValidateObject method)) when the object is saved. This is only applicable to persistent objects.|
Note: The use of ValidateOnSet is not recommended-it can cause excessive communication between client and server in distributed applications. It is provided for compatability with previous versions.
The serialized state is of the form: $LB(name,val,name,val)
pSubmit is the name of the submit button (i.e., $AUTOFORM_SAVE).
At the scheduled time, the Task Manager creates an instance of this object, sets any property values using the stored "Settings" for the task, and then invokes this method to execute the task.
In order to execute a real task, override this method in a subclass.
The 'pState' value is the serialized list of Property values stored in the scheduled Task in %SYS.Task.Settings.