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

PropertyReturnsDescription
callbackString
currentUserLong
fifoKeyStringKey identifying the FIFO queue this task must be processed sequentially within.
orgIdlongId of the organisation which owns this task.
processOrganisationIdLongId of the organisation this task should be processed within.
stateDataObjectData describing the task's result or progress, returned to the client as JSON.
statusStringUser friendly status message describing the current progress of the task.
statusInfoStatusInfoThe status tracker that the async process updates as this task progresses and completes.
taskNameStringName that uniquely identifies this task within its organisation.
websiteBranchIdLong

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.

ParameterDescription
stateDatathe state data to record

getStatusInfo()

Returns: StatusInfo

The status tracker that the async process updates as this task progresses and completes.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.