Skip to main content

ProcessInstances.GetAllInstancesAsync

Description

The API gets all the process instances inside the connected Control Room.

Signature [C#]

Task<List<ProcessInstance>> GetAllInstancesAsync();

Properties

Output

PropertyDescription
Task<List<ProcessInstance>>Returns list of process instances.

Remarks

Use GetAllInstancesAsync API to get all the process instances inside the connected Control Room.

Example

C#
public void GetAllInstances()
{
IControlRoomContext context = LoginControlRoom();

List<ProcessInstance> processInstances = Task.Run(() => context.ProcessInstances.GetAllInstancesAsync()).Result;
foreach (ProcessInstance processInstance in processInstances)
System.Console.WriteLine("Instance Name: " + processInstance.InstanceName + "\n");
}
C#
public IControlRoomContext LoginControlRoom()
{
IControlRoomContext context;
string connectionString;

connectionString = "ServerUrl=https://demo.onnitellibuddies.com;UserName=demoadmin;Password=password";
context = new ControlRoomContext(connectionString);

context.Open();
return context;
}