Process.UploadAsync
Description
The API uploads the process into the connected AI Command Center from the specified path.
Signature [C#]
Task UploadAsync(string packagePath);
Properties
Input
| Parameter | Type | Required / default | Description |
|---|---|---|---|
packagePath | string | Required | Specify the process package path. |
Remarks
Use UploadAsync API to upload Processes from a specified path into the connected AI Command Center.
Example
C#
public async Task UploadProcess()
{
IControlRoomContext context = LoginControlRoom();
try
{
string uploadProcessLocation = "C:\\Users\\Public\\Documents\\";
string processPkgName = "File Operations.1.0.0.0.nupkg";
string processPath = Path.Combine(uploadProcessLocation, processPkgName);
await context.Processes.UploadAsync(processPath);
Console.WriteLine("Process uploaded to AI Command Center from the path: " + processPath);
}
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.