searchTasks

Purpose

This operation returns task IDs based on the search criteria.

Input

The input specifies the task search criteria. In addition to the search criteria, you must specify the startSearchPosition property, which should begin with 1, and the maximumTasksToShow property, which should be within the range of 1 to 1,000.

Return

long[]

A list of task IDs corresponding to the search criteria.

Java Examples

See webservice_toolkit:

java\client\src\examples\pm\ProjectServiceClient.java

searchTasks ()

SearchTasksDocument schTsksDoc =
SearchTasksDocument.Factory.newInstance();
SearchTasks schTsks = schTsksDoc.addNewSearchTasks();
// Create SearchPreference element
SearchTaskPreferenceType searchPreference =
schTsks.addNewSearchPreferences();
// searchPreference
searchPreference.setMaximumTasksToShow(10);
searchPreference.setStartSearchPosition(1);
searchPreference.setScheduledStartFrom(taskScheduleStart);
// searchPreference
searchPreference.setScheduledStartTo(taskScheduleFinish);
SearchTasksResponseDocument schTskRespDoc =
stub.searchTasks(schTsksDoc);
long[] taskids =
schTskRespDoc.getSearchTasksResponse().getTaskIdArray();