This operation retrieves a list of subprocesses for a process instance using administrative access. Use it when an administrative script needs to inspect child process instances. If you don't need the elevated privileges, use Retrieve a List of Subprocesses of a Process Instance without them instead.
The base request is:
subprocesses(processInstanceId, maxItems, skipCount, sort)
Use subprocesses(...) to retrieve the subprocesses associated with the specified process instance. You can optionally specify paging and sorting parameters.
The following example retrieves up to 25 subprocesses:
variables.children =
new RuntimeProcessInstanceAdminService()
.subprocesses(
variables.processInstanceId,
25,
0,
null
);
variables.processInstanceId provides the identifier of the parent process instance. 25 specifies the maximum number of subprocesses to return. 0 specifies that no results are skipped. null indicates that no sorting option is specified. subprocesses(...) retrieves the matching subprocesses using administrative access and assigns the result to the children process variable.
The operation has the following signature:
RuntimeProcessInstanceAdminService.subprocesses(
processInstanceId: string,
maxItems?: number,
skipCount?: number,
sort?: string
)