COMAND System Task Content Types
Overview
The system task package provides a framework for starting, monitoring, event logging and managing processes.
Content Types
System Task
Represents a task, which is often run as a background process, executed by the system.
Implements
Logging
Extends
Fields
Title (Identifier) | Type | Properties | Description |
---|---|---|---|
Title | (Data Type) Text Line | User-friendly name for the task. | |
PID | (Data Type) Number | Process ID for the operating system process used to execute the task. | |
Process State | (Data Type) Number | State of the process as last determined by the system. The system will periodically check on a process to see if it has terminated without reporting completion. Options are: 1=Running, 2=Unexpectedly Terminate, 3=Completed | |
User | (Content Type) User | Ref | The user responsible for starting the task. |
Status | (Data Type) Text Line | Brief description of the current status of the task. | |
Event Log | (Data Type) Text Box | Event Log from tasks, typically in HTML format. | |
Result | (Data Type) Text Box | String that indicates or represents the result of the task. This is unique to the task and may be empty, informational or contain data, such as JSON or the OID or UUID of an object with further information. Should this be an embedded list of objects or a reference to an object? | |
Start Time | (Data Type) Timestamp | Time the task was started. | |
End Time | (Data Type) Timestamp | Time the task completed, or was discovered terminated. |
Methods
static start_bg_task( $repo, $title, $class, $static_method, $params ) [PHP]
Starts a background task and creates a corresponding System Task where information about the task is populated and maintained. The status and event log will be automatically populated with basic information. However, the task itself is responsible for updating the status and event log with more specific information if desired.
static kill_bg_task( $repo, $task_uuid ) [PHP]
set_status( $status ) [PHP]
set_started( $status ) [PHP]
set_terminated( $status ) [PHP]
set_completed( $status ) [PHP]