Process.GetProcessVersionByGuid
Description
This API gets the latest or active version of the specified process from the connected Control Room.
Signature [C#]
Task<string
> GetProcessDefVersionByGuid(string processGuid, bool getLatestVersion = false)
Properties
Input
| Property | Description | | :------- | :---------- | | processGuid | Specify the GUID of the process to be retrieved. | | getLatestVersion | Specify true to get the latest process's version. By default, it gets the currently active process's version. |||
Output
| Property | Description |
| :--- | :--- |
| Task<string
> | Returns the value that indicates the version of the process. |
|||
Remarks
Use GetProcessDefVersionByGuid API to get the latest or the currently active version of the specified process from the connected Control Room.
Example
C#
public void GetProcessDefVersionByGuid()
{
IControlRoomContext context = LoginControlRoom("RegularBuild", "BasicAuth");
string processGuid = "9E364235-D7A2-4845-97A8-0FC26E1D428B";
bool getLatestVersion = true;
var processVersion = Task.Run(() => context.Processes.GetProcessDefVersionByGuid(processGuid, getLatestVersion)).Result;
Console.WriteLine("Process version: " + processVersion);
}
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;
}