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
Property | Description |
---|---|
processId | Specify the processId to download the process. |
documentId | Specify the documentId of the process. |
destinationDir | Specify the destination directory to save the downloading process. |
Output
Property | Description |
---|---|
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;
}