Managed Object - TaskManager

Property of
ServiceContent
See also
Task, TaskDescription, TaskFilterSpec, TaskHistoryCollector, TaskInfo


Managed Object Description

The Virtual Infrastructure SDK creates a task for each command that has been invoked. Clients can use task objects to keep track of operations. Clients use the task manager, available in ServiceInstance, to access task objects.

Properties

Name Type Description
description PTaskDescription

Static descriptive strings used to represent task information to users. These strings are locale-specific.
maxCollector Pxsd:int

For each client, the maximum number of task collectors that can exist simultaneously.
recentTask* PManagedObjectReference[]
to a Task[]

Tasks that completed recently, are currently running, or are queued to run.

This list contains only tasks visible to the client. Visibility depends on the client having permissions to access the task's managed entity.

*May not be presentP Required privilege: System.View

Methods

Methods defined in this Managed Object
CreateCollectorForTasks, CreateTask

CreateCollectorForTasks

Creates a task history collector, as a specialized history collector that provides TaskInfo objects.

Task collectors do not persist beyond the current client session.

Required Privileges
System.View

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the TaskManager used to make the method call.
filterTaskFilterSpec

The specification for the task query filter.

Return Value

Type Description
ManagedObjectReference
to a TaskHistoryCollector
The task collector based on the filter.

Faults

Type Description
InvalidArgumentThrown if the filter is null or unknown.
InvalidStateThrown if there are more than the maximum number of task collectors.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



CreateTask

Creates a new task, specifying the object with which the task is associated, the type of task and whether the task is cancelable.

Required Privileges
Task.Create
Since
VI API 2.5

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the TaskManager used to make the method call.
objManagedObjectReference

ManagedObject with which Task will be associated
taskTypeIdxsd:string

Extension registered task type identifier for type of task being created
initiatedBy*xsd:string

The name of the user on whose behalf the Extension is creating the task
cancelablexsd:boolean

True if the task should be cancelable, else false
*Need not be set

Return Value

Type Description
TaskInfoTaskInfo Data object describing the new task

Faults

Type Description
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition