ProcessInstances.GetInstanceStatusByIdAsync
Description
The API gets the process instance status of the specified process instance ID inside the connected Control Room.
Signature [C#]
Task<string> GetInstanceStatusByIdAsync(string instanceId);
Properties
Input
Property | Description |
---|---|
instanceId | The process instance ID for which the process instance status has to be retrieved. |
Output
Property | Description |
---|---|
Task<ProcessInstance> | Returns process instance status. |
Remarks
Use GetInstanceStatusByIdAsync API to get process instance status using process instance id inside the connected Control Room.
Example
C#
public void GetInstanceStatusById()
{
IControlRoomContext context = LoginControlRoom();
string instanceId = "e42a93f5d53245d788909fd655b41cfe";
string status = Task.Run(() => context.ProcessInstances.GetInstanceStatusByIdAsync(instanceId)).Result;
System.Console.WriteLine("Status: " + status);
}
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;
}