Represents a single asynchronous JavaScript task queued through JsScheduler.executeAsyncTask and its FIFO and callback variants, tracking its progress and carrying the arguments the target function will be invoked with. When the task is dispatched, doProcess resolves the current organisation or website branch root folder, runs as the invoking user where one is set, and invokes the named JS function through the app's controller mapping cache. Progress and completion are exposed through the associated JsStatusInfo, which the caller can poll or which can fire a callback function once the task completes.
Implements: TrackedProcessable
Properties
| Property | Returns | Description |
|---|---|---|
| callback | String | |
| currentUser | Long | |
| fifoKey | String | Key identifying the FIFO queue this task must be processed sequentially within. |
| orgId | long | Id of the organisation which owns this task. |
| processOrganisationId | Long | Id of the organisation this task should be processed within. |
| stateData | Object | Data describing the task's result or progress, returned to the client as JSON. |
| status | String | User friendly status message describing the current progress of the task. |
| statusInfo | StatusInfo | The status tracker that the async process updates as this task progresses and completes. |
| taskName | String | Name that uniquely identifies this task within its organisation. |
| websiteBranchId | Long |
Methods
getFifoKey()
Returns: String
Key identifying the FIFO queue this task must be processed sequentially within.
getProcessOrganisationId()
Returns: Long
Id of the organisation this task should be processed within.
getOrgId()
Returns: long
Id of the organisation which owns this task.
getTaskName()
Returns: String
Name that uniquely identifies this task within its organisation.
getStatus()
Returns: String
User friendly status message describing the current progress of the task.
getStateData()
Returns: Object
Data describing the task's result or progress, returned to the client as JSON.
setStateData(Object stateData)
Returns: void
Sets the data describing this task's result or progress, which is returned to the client as JSON.
| Parameter | Description |
|---|---|
stateData | the state data to record |
getStatusInfo()
Returns: StatusInfo
The status tracker that the async process updates as this task progresses and completes.