diff --git a/Conductor/Client/Extensions/ApiExtensions.cs b/Conductor/Client/Extensions/ApiExtensions.cs index 5e162d6b..91623246 100644 --- a/Conductor/Client/Extensions/ApiExtensions.cs +++ b/Conductor/Client/Extensions/ApiExtensions.cs @@ -12,11 +12,11 @@ public class ApiExtensions private const string ENV_KEY_ID = "KEY"; private const string ENV_SECRET = "SECRET"; - private static Configuration _configuration = null; + public static Configuration Configuration { get; set; } static ApiExtensions() { - _configuration = new Configuration() + Configuration = new Configuration { Timeout = 30 * 1000, BasePath = GetEnvironmentVariable(ENV_ROOT_URI), @@ -37,12 +37,19 @@ public static WorkflowExecutor GetWorkflowExecutor() public static T GetClient() where T : IApiAccessor, new() { - return _configuration.GetClient(); + return Configuration.GetClient(); } public static Configuration GetConfiguration() { - return _configuration; + return Configuration; + } + + public static string GetWorkflowExecutionURL(string workflowId) + { + var basePath = Configuration.BasePath; + var prefix = basePath.Remove(basePath.Length - 4); + return $"{prefix}/execution/{workflowId}"; } private static string GetEnvironmentVariable(string variable)