Table of Contents

TTMSMCPTaskRegistry.GetTask Method

Looks up a registered task by identifier.

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

Syntax

function GetTask(const ATaskId: string): TTMSMCPTask;

Remarks

The lookup itself is not session-scoped. A request that names a task belonging to another session must be answered as if the task did not exist, so compare TTMSMCPTask.SessionId with the calling session before using the result.

Parameters

Name Description
ATaskId Identifier to look for.

Returns

The task, which stays owned by the registry, or nil when no task with that identifier is registered - either because it was never created, or because its lifetime has elapsed and it has been purged.