This operation retrieves a list of process instances using administrative access. Use it when an administrative script needs to retrieve process instances with broader visibility.
The base request is:
getProcessInstances()
Use the optional RuntimeQueryMap to control paging and sorting of the returned process instances.
The following example retrieves up to 25 process instances:
const queryMap = {
skipCount: 0,
maxItems: 25,
sort: 'id,DESC'
};
variables.processes =
new RuntimeProcessInstanceAdminService()
.getProcessInstances(queryMap);
In this example:
- skipCount: 0 specifies the number of results to skip before returning results.
- maxItems: 25 limits the number of results returned to 25.
- sort: 'id,DESC' sorts the results by id in descending order.
- getProcessInstances(queryMap) retrieves process instances using the specified paging and sorting parameters.