Oracle® WebCenter Interaction Development Kit 10.3.3.0.0

ITaskListManager.QueryTasks Method (ITaskList, ITaskFilter)

Returns an ITask array in the given task list based on the ITaskFilter.

ITask[] QueryTasks(
   ITaskList tasklist,
   ITaskFilter taskFilter
);

Parameters

tasklist
The task list to query tasks from; cannot be null.
taskFilter
The task filter to construct the query; cannot be null.

Return Value

An ITask array of task objects in a task list.

Remarks

The following sample code shows how query for tasks in a task list.

ITaskFilter taskFilter = tasklistManager.CreateTaskFilter();

//search on all tasks; other options include searching for COMPLETED tasks, OVERDUE tasks, or PENDING tasks
taskFilter.CompletionType = TaskCompletionFilterTypes.All;

//limit the return results to be 10; setting this to 0 will return all results
taskFilter.MaximumResults = 10;

//disable security checking on the returned objects against the user who performs this query,
//so that all objects will be returned
taskFilter.RestoreSecurity = false;

//user TaskQueryOrder to sort the query result; below TaskQueryOrder shows sorting the returned task lists by NAME in ascending order
TaskQueryOrder taskQueryOrder = new TaskQueryOrder(TaskAttributes.Name, true);
taskFilter.setQueryOrders(new TaskQueryOrder[] { taskQueryOrder } );

//an array of ITask objects are returned from queryTasks(ITaskList); if no result is retrieved, a zero-length array will be returned
ITask[] retrievedTasks = tasklistManager.queryTasks(tasklist, taskFilter);

Exceptions

Exception Type Condition
CollaborationException The method call resulted in an error.
InvalidOperationException The project has not yet been stored or has already been removed.
SoapException There was a communication problem during the execution of the remote method call.

See Also

ITaskListManager Interface | Plumtree.Remote.PRC.Collaboration.Tasklist Namespace | ITaskListManager.QueryTasks Overload List