Skip to main content

Process.DownloadAsync

Description

The API downloads an existing Process with specified ProcessId from the connected Control Room.

Signature [C#]

Task<string> DownloadAsync(int processId, int documentId, string destinationDir)

Properties

Input

PropertyDescription
processIdSpecify the processId to download the process.
documentIdSpecify the documentId of the process.
destinationDirSpecify the destination directory to save the downloading process.

Output

PropertyDescription
Task<string>Returns the path of the downlaoded process.

Remarks

Use DownloadAsync API to download the process with specified ProcessId from the connected Control Room.

Example

C#
public void DownloadProcess()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");

int processId = 1;
int documentId = 703;
private string downloadProcessLocation = "C:\\Users\\Public\\Documents";

var path = Task.Run(() => context.Processes.DownloadAsync(processId, documentId, downloadProcessLocation)).Result;
Console.WriteLine("Process downloaded from Control Room to the path: " +path);
}
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;
}