Process.DownloadAsync
Description
The API downloads an existing Process with specified ProcessId from the connected AI Command Center.
Signature [C#]
Task<string> DownloadAsync(int processId, int documentId, string destinationDir);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
processId | int | Required | Specify the processId to download the process. |
documentId | int | Required | Specify the documentId of the process. |
destinationDir | string | Required | Specify the destination directory to save the downloading process. |
Output
| Property | Description |
|---|---|
Task<string> | Returns the path of the downloaded process. |
Remarks
Use DownloadAsync API to download the process with specified ProcessId from the connected AI Command Center.
Example
C#
public async Task DownloadProcess()
{
IControlRoomContext context = LoginControlRoom();
try
{
int processId = 1;
int documentId = 703;
string downloadProcessLocation = "C:\\Users\\Public\\Documents";
var path = await context.Processes.DownloadAsync(processId, documentId, downloadProcessLocation);
Console.WriteLine("Process downloaded from AI Command Center to the path: " + path);
}
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.