Processes
Service for managing UiPath Maestro Processes
UiPath Maestro is a cloud-native orchestration layer that coordinates bots, AI agents, and humans for seamless, intelligent automation of complex workflows. UiPath Maestro Guide
Usage¶
Prerequisites: Initialize the SDK first - see Getting Started
import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
const maestroProcesses = new MaestroProcesses(sdk);
const allProcesses = await maestroProcesses.getAll();
Methods¶
getAll()¶
getAll():
Promise<MaestroProcessGetAllResponse[]>
Returns¶
Promise<MaestroProcessGetAllResponse[]>
Promise resolving to array of MaestroProcess objects with methods MaestroProcessGetAllResponse
Example¶
// Get all processes
const allProcesses = await maestroProcesses.getAll();
// Access process information and incidents
for (const process of allProcesses) {
console.log(`Process: ${process.processKey}`);
console.log(`Running instances: ${process.runningCount}`);
console.log(`Faulted instances: ${process.faultedCount}`);
// Get incidents for this process
const incidents = await process.getIncidents();
console.log(`Incidents: ${incidents.length}`);
}
getIncidents()¶
getIncidents(
processKey:string,folderKey:string):Promise<ProcessIncidentGetResponse[]>
Get incidents for a specific process
Parameters¶
| Parameter | Type | Description |
|---|---|---|
processKey |
string |
The key of the process to get incidents for |
folderKey |
string |
The folder key for authorization |
Returns¶
Promise<ProcessIncidentGetResponse[]>
Promise resolving to array of incidents for the process ProcessIncidentGetResponse
Example¶
// Get incidents for a specific process
const incidents = await maestroProcesses.getIncidents('<processKey>', '<folderKey>');
// Access incident details
for (const incident of incidents) {
console.log(`Element: ${incident.incidentElementActivityName} (${incident.incidentElementActivityType})`);
console.log(`Status: ${incident.incidentStatus}`);
console.log(`Error: ${incident.errorMessage}`);
}
getInstanceStatusTimeline()¶
getInstanceStatusTimeline(
startTime:Date,endTime:Date,options?:TimelineOptions):Promise<InstanceStatusTimelineResponse[]>
Get all instances status counts aggregated by date for maestro processes.
Returns time-grouped counts of instances grouped by status (Completed, Faulted, Cancelled),
useful for rendering time-series charts. Use groupBy to control the time bucket size
(hour, day, or week) — defaults to day if not provided.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
startTime |
Date |
Start of the time range to query |
endTime |
Date |
End of the time range to query |
options? |
TimelineOptions |
Optional settings for time bucketing granularity |
Returns¶
Promise<InstanceStatusTimelineResponse[]>
Promise resolving to an array of InstanceStatusTimelineResponse
Examples¶
// Get daily instance status for the last 7 days
const now = new Date();
const sevenDaysAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000);
const statuses = await maestroProcesses.getInstanceStatusTimeline(sevenDaysAgo, now);
for (const entry of statuses) {
console.log(`${entry.startTime} — ${entry.status}: ${entry.count}`);
}
import { TimeInterval } from '@uipath/uipath-typescript/maestro-processes';
// Get hourly breakdown
const statuses = await maestroProcesses.getInstanceStatusTimeline(startTime, endTime, {
groupBy: TimeInterval.Hour,
});
// Get all-time data (from Unix epoch to now)
const allTime = await maestroProcesses.getInstanceStatusTimeline(new Date(0), new Date());
getTopExecutionDuration()¶
getTopExecutionDuration(
startTime:Date,endTime:Date,options?:TopQueryOptions):Promise<ProcessGetTopDurationResponse[]>
Get the top 5 processes ranked by total duration within a time range.
Returns an array of up to 5 processes sorted by their total execution time, useful for identifying the longest-running processes in a given period.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
startTime |
Date |
Start of the time range to query |
endTime |
Date |
End of the time range to query |
options? |
TopQueryOptions |
Optional filters (packageId, processKey, version) |
Returns¶
Promise<ProcessGetTopDurationResponse[]>
Promise resolving to an array of ProcessGetTopDurationResponse
Examples¶
import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
const maestroProcesses = new MaestroProcesses(sdk);
// Get top processes by duration for the last 7 days
const topProcesses = await maestroProcesses.getTopExecutionDuration(
new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
new Date()
);
for (const process of topProcesses) {
console.log(`${process.packageId}: ${process.duration}ms total`);
}
// Get top processes by duration for a specific package
const filtered = await maestroProcesses.getTopExecutionDuration(
new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
new Date(),
{ packageId: '<packageId>' }
);
getTopFaultedCount()¶
getTopFaultedCount(
startTime:Date,endTime:Date,options?:TopQueryOptions):Promise<ProcessGetTopFaultedCountResponse[]>
Get the top 10 processes ranked by failure count within a time range.
Returns an array of up to 10 processes sorted by how many instances faulted, useful for identifying the most error-prone processes in a given period.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
startTime |
Date |
Start of the time range to query |
endTime |
Date |
End of the time range to query |
options? |
TopQueryOptions |
Optional filters (packageId, processKey, version) |
Returns¶
Promise<ProcessGetTopFaultedCountResponse[]>
Promise resolving to an array of ProcessGetTopFaultedCountResponse
Examples¶
import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
const maestroProcesses = new MaestroProcesses(sdk);
// Get top processes by faulted count for the last 7 days
const topFailing = await maestroProcesses.getTopFaultedCount(
new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
new Date()
);
for (const process of topFailing) {
console.log(`${process.packageId}: ${process.faultedCount} failures`);
}
// Get top processes by faulted count for a specific package
const filtered = await maestroProcesses.getTopFaultedCount(
new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
new Date(),
{ packageId: '<packageId>' }
);
getTopRunCount()¶
getTopRunCount(
startTime:Date,endTime:Date,options?:TopQueryOptions):Promise<ProcessGetTopRunCountResponse[]>
Get the top 5 processes ranked by run count within a time range.
Returns an array of up to 5 processes sorted by how many times they were executed, useful for identifying the most active processes in a given period.
Parameters¶
| Parameter | Type | Description |
|---|---|---|
startTime |
Date |
Start of the time range to query |
endTime |
Date |
End of the time range to query |
options? |
TopQueryOptions |
Optional filters (packageId, processKey, version) |
Returns¶
Promise<ProcessGetTopRunCountResponse[]>
Promise resolving to an array of ProcessGetTopRunCountResponse
Examples¶
import { MaestroProcesses } from '@uipath/uipath-typescript/maestro-processes';
const maestroProcesses = new MaestroProcesses(sdk);
// Get top processes by run count for the last 7 days
const topProcesses = await maestroProcesses.getTopRunCount(
new Date(Date.now() - 7 * 24 * 60 * 60 * 1000),
new Date()
);
for (const process of topProcesses) {
console.log(`${process.packageId}: ${process.runCount} runs`);
}