Table of Contents

TTMSMCPTaskRegistry.CreateTask Method

Creates a task, gives it a new unique identifier and registers it.

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

Syntax

function CreateTask(const AMethod: string; ATTL: Integer = 60000; APollInterval: Integer = 5000; const ASessionId: string = ''): TTMSMCPTask;

Parameters

Name Description
AMethod Name of the operation the task is started for.
ATTL Lifetime in milliseconds, counted from creation. Defaults to 60000.
APollInterval Interval in milliseconds the client is advised to wait between two status requests. Defaults to 5000.
ASessionId Identifier of the transport session that owns the task. Leave empty for transports that have no sessions.

Returns

The registered task, which stays owned by the registry. Read its identifier to return it to the client.