The GetTaskList function is called when a user performs a query for tasks. It returns a worklist of tasks that match the criteria that are passed in as parameters.