GetAsynchronousTaskStatus
Returns status information for the asynchronous thread launched by CreateStarSchema. GetAsynchronousTaskStatus returns the identity of the current task, the number of items to be processed, currently processed number of items, and whether the thread is still running. Once the thread has finished, the method also returns the HRESULT that represents the thread’s success or failure to extract.
Tip: | You can use GetAsynchronousTaskStatus to display the status of the thread. For example, you can periodically update a progress bar to display the number of items that have been processed. |
Syntax
<HsvStarSchemaACM>.GetAsynchronousTaskStatus plCurrentTask, pdNumRecords, pdNumCompletedRecords, pvbIsRunning, plErrorCode
Argument | Description |
---|
plCurrentTask | EA_TASK_STATUS_FLAGS. Returns the identity of the task currently being processed by the CreateStarSchema thread. Valid values represented by the following constants (from Enum EA_TASK_STATUS_FLAGS): EA_TASK_STATUS_BLOCKED - The task is waiting to be queued. EA_TASK_STATUS_CANCELLED - The task has been cancelled. EA_TASK_STATUS_COMPLETE - The task is complete. EA_TASK_STATUS_COMPLETE_W_ERRORS - The task is complete, but an error has occurred. The error number is returned by the plErrorCode argument. EA_TASK_STATUS_DATA - The task is extracting data. EA_TASK_STATUS_ESSBASE_AGG - Aggregation is occurring externally in Essbase. EA_TASK_STATUS_INITIALIZING - The task is initializing. EA_TASK_STATUS_METADATA - The task is extracting metadata. EA_TASK_STATUS_QUEUED - The task is queued. EA_TASK_STATUS_SQL_AGG - For internal use. Note: Enum EA_TASK_STATUS_FLAGS also contains the EA_TASK_STATUS_MIN and EA_TASK_STATUS_MAX constants, which represent the lower and upper bounds of the enumeration.
|
pdNumRecords | Double. Returns the total number of items to be processed for the task. This does not apply to the Initializing task. Note: The number of items processed differs from the number of records added to the database. For data extracts, the number of items represents the potential cell intersections. For metadata extracts, the number of items represents the combination of specified members. |
pdNumCompletedRecords | Double. Returns the total number of items that have been processed for the task. |
pvbIsRunning | Boolean. Indicates whether the CreateStarSchema thread is still running. Returns TRUE if the thread is running, FALSE if it has finished. |
plErrorCode | Long. Returns the HRESULT for the thread’s final processing status. This value is valid only when the thread has finished running. |