Represents a task with various states and operations.
More...
◆ canCancel()
Checks if the task can be cancelled.
- Returns
- {boolean} True if the task can be cancelled; otherwise, false.
◆ errorCode()
Gets the error code of the task.
- Returns
- {number} The current error code of the task.
◆ exeSuccess()
Checks if the task was executed successfully.
- Returns
- {boolean} True if the task was successful; otherwise, false.
◆ extErrorCode()
Gets the extended error code of the task.
- Returns
- {number} The extended error code, if any, of the task.
◆ getPriority()
Gets the current priority of the task.
- Returns
- {number} The current priority level of the task.
◆ getStatus()
Gets the current status of the task.
- Returns
- {number} The current status of the task.
◆ isCanceled()
Checks if the task has been cancelled.
- Returns
- {boolean} True if the task has been cancelled; otherwise, false.
◆ isModify()
Checks if the task has been modified.
- Returns
- {boolean} True if the task has been modified; otherwise, false.
◆ notify()
Notifies about the result of the js funcion.
- Parameters
-
| {boolean} | result - The result to be notified, such as success or failure. |
◆ setErrorCode()
| Task.setErrorCode |
( |
error |
| ) |
|
Sets the error code for the task.
- Parameters
-
| {number} | error - The error code to be set for the task. |
◆ setPriority()
| Task.setPriority |
( |
priority |
| ) |
|
Sets the priority of the task.
- Parameters
-
| {number} | priority - The new priority level for the task. |
◆ setStatus()
| Task.setStatus |
( |
status |
| ) |
|
Sets the status of the task.
- Parameters
-
| {number} | status - The new status to be set for the task. |