ProcessInstances.GetModelDataAsync
Description
The API gets model data of specified process instance inside the connected Control Room.
Signature [C#]
Task<string> GetModelDataAsync(string processInstanceId);
Properties
Input
Property | Description |
---|---|
processInstanceId | The process instance ID to get the model data. |
Output
Property | Description |
---|---|
Task<string> | Returns model data. |
Remarks
Use GetModelDataAsync API to get model data of a process instance inside the connected Control Room.
Example
C#
public void GetModelData()
{
IControlRoomContext context = LoginControlRoom();
string processInstanceId = "e42a93f5d53245d788909fd655b41cfe";
string modelData = Task.Run(() => context.ProcessInstances.GetModelDataAsync(processInstanceId)).Result;
System.Console.WriteLine("Model Data: " + modelData);
}
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;
}