Skip to main content
Table of Contents

TTMSMCPTaskRegistry.UpdateTaskStatus Method

Moves a registered task to another state and wakes the callers waiting for it to finish.

API unit family: TMS.MCP.Tasks Declaring type: TTMSMCPTaskRegistry

Syntax

TMS.MCP.Tasks.hppPascalC++
procedure UpdateTaskStatus(const ATaskId: string; AStatus: TTMSMCPTaskStatus; const AMessage: string = '');
void __fastcall UpdateTaskStatus(const System::UnicodeString ATaskId, TTMSMCPTaskStatus AStatus, const System::UnicodeString AMessage = System::UnicodeString());

Remarks

Does nothing when the identifier is unknown or when the task has already reached a final state, because a finished task must not change state again. Cancellation is cooperative: moving a task to tsCancelled records the request, but the work itself keeps running until the code performing it notices and stops.

Parameters

Name Description
ATaskId Identifier of the task to update.
AStatus State to move the task to.
AMessage Optional text describing the new state. The existing message is kept when this is empty.