Process.GetVersions
Description
Gets the list of all the release versions in the form of ProcessInfo of specified process ID from the connected AI Command Center.
Signature [C#]
Task<List<ProcessInfo>> GetVersions(int processId);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
processId | int | Required | Specify the process ID for retrieving the versions. |
Output
| Property | Description |
|---|---|
| Task<List<ProcessVersion>> | Returns all the release versions of the Process. |
Remarks
Use GetVersions API to get the list of the release version of the process in the form of ProcessVersion from the connected AI Command Center.
Example
C#
public async Task GetProcessVersions()
{
IControlRoomContext context = LoginControlRoom();
try
{
int processId = 1;
var actualProcesses = await context.Processes.GetVersions(processId);
foreach (ProcessVersion processVersion in actualProcesses)
Console.WriteLine(processVersion.Version);
}
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.