This operation retrieves a list of tasks, optionally using query parameters. Use it when a script needs to find tasks that match runtime criteria.
The base request is:
getTasks(queryMap)
The following example retrieves tasks using query parameters stored in queryMap:
variables.tasks =
new RuntimeTaskService()
.getTasks(queryMap);
Use RuntimeQueryMap when an API operation accepts optional paging or sorting query parameters.
The following example retrieves up to 25 tasks and sorts them by identifier in descending order:
const queryMap = {
skipCount: 0,
maxItems: 25,
sort: 'id,DESC'
};
variables.tasks =
new RuntimeTaskService()
.getTasks(queryMap);
In this example:
- skipCount: 0 specifies the number of results to skip before returning results.
- maxItems: 25 limits the number of tasks returned to 25.
- sort: 'id,DESC' sorts the tasks by id in descending order.
- getTasks(queryMap) retrieves tasks using the specified paging and sorting parameters and assigns the results to the tasks process variable.