Skip to main content
Version: Current

ProcessInstances.GetModelDataAsync

Description​

Retrieves Workflow Data for the specified process instance in the connected AI Command Center.

Workflow Data is the current display name for Model Data. The SDK method and model names retain ModelData for backward compatibility. See Workflow Data.

Signature [C#]​

Task<string> GetModelDataAsync(string processInstanceId);

Properties​

Input​

ParameterTypeRequired / defaultDescription
processInstanceIdstringRequiredThe process instance ID to get the Workflow Data.

Output​

PropertyDescription
Task<string>Returns Workflow Data.

Remarks​

Use GetModelDataAsync API to get Workflow Data of a process instance inside the connected AI Command Center.

Example​

C#
public async Task GetModelData()
{
IControlRoomContext context = LoginControlRoom();
try
{
string processInstanceId = "e42a93f5d53245d788909fd655b41cfe";
string modelData = await context.ProcessInstances.GetModelDataAsync(processInstanceId);
System.Console.WriteLine("Workflow Data: " + modelData);
}
finally
{
context.Close();
}
}
Connection helper
public IControlRoomContext LoginControlRoom()
{
string RequiredSetting(string name) => Environment.GetEnvironmentVariable(name) ?? throw new InvalidOperationException($"Set {name} before running this example.");
string serverUrl = RequiredSetting("INTELLIBUDDIES_SERVER_URL");
string userName = RequiredSetting("INTELLIBUDDIES_USERNAME");
string password = RequiredSetting("INTELLIBUDDIES_PASSWORD");
string connectionString = $"ServerUrl={serverUrl};UserName={userName};Password={password}";
IControlRoomContext context = new ControlRoomContext(connectionString);
context.Open();
return context;
}

See Get started for namespaces, configuration, and context cleanup, and SDK usage for error handling.