Skip to main content
Version: Current

ProcessInstances.GetInstanceTasksAsync

Description​

The API gets tasks associated with process instance using the specified process instance ID inside the connected AI Command Center.

Signature [C#]​

Task<List<CRTaskInfo>> GetInstanceTasksAsync(string instanceId);

Properties​

Input​

PropertyDescription
instanceIdThe process instance ID of which the tasks must be retrieved.

Output​

PropertyDescription
Task<List<CRTaskInfo>>Returns the tasks associated with specified process instance id.

Remarks​

Use GetInstanceTasksAsync API to get the tasks associated with process instance using process instance id inside the connected AI Command Center.

Example​

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

string instanceId = "e42a93f5d53245d788909fd655b41cfe";

List<CRTaskInfo> tasks = Task.Run(() => context.ProcessInstances.GetInstanceTasksAsync(instanceId)).Result;
foreach (CRTaskInfo task in tasks)
System.Console.WriteLine($"Task Name : {task.Name} \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;
}