Skip to main content

ProcessInstances.GetInstanceDataAsync

Description

The API gets process data associated with the process instance using the specified process instance ID inside the connected Control Room.

Signature [C#]

Task<ProcessInstanceData> GetInstanceDataAsync(string instanceId);

Properties

Input

PropertyDescription
instanceIdThe process instance id of which the process data has to be retrieved.

Output

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

Remarks

Use GetInstanceDataAsync API to get the process data associated with the process instance using the process instance id inside the connected Control Room.

Example

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

string instanceId = "e42a93f5d53245d788909fd655b41cfe";

ProcessInstanceData data = Task.Run(() => context.ProcessInstances.GetInstanceDataAsync(instanceId)).Result;
System.Console.WriteLine($"Form Data: {data.FormData}");
}
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;
}