/// <summary>
        /// Execute the task of the DSSConfiguration activity.
        /// </summary>
        /// <param name="executionData"></param>
        /// <returns></returns>
        public PluginExecutionResult Execute(PluginExecutionData executionData)
        {
            _activityData = executionData.GetMetadata <DssConfigurationActivityData>();
            TopCatUIAutomation.Initialize();
            UpdateStatus($"Launching the DSS Configuration Task : {_activityData.TaskName}");
            try
            {
                List <Object>        parameterList        = new List <object>();
                DssConfigurationTask dssConfigurationTask = new DssConfigurationTask(executionData.SessionId, executionData.Credential.UserName);
                var method = typeof(DssConfigurationTask).GetMethod(_activityData.TaskName);
                foreach (var parameterInfo in method.GetParameters())
                {
                    object data;
                    _activityData.ParameterValueDictionary.TryGetValue(parameterInfo.ParameterType.Name, out data);
                    parameterList.Add(data);
                }

                method.Invoke(dssConfigurationTask, parameterList.ToArray());
            }
            catch (Exception exception)
            {
                return(new PluginExecutionResult(PluginResult.Failed, exception.InnerException ?? exception));
            }

            return(new PluginExecutionResult(PluginResult.Passed));
        }
 /// <summary>
 /// Initializes the configuration control with the specified settings.
 /// </summary>
 /// <param name="configuration"></param>
 /// <param name="environment"></param>
 public void Initialize(PluginConfigurationData configuration, PluginEnvironment environment)
 {
     _data = configuration.GetMetadata <DssConfigurationActivityData>();
     if (string.IsNullOrEmpty(_data.TaskName))
     {
         return;
     }
     tasksComboBox.SelectedIndex = -1;
     tasksComboBox.SelectedItem  = _data.TaskName;
 }
 /// <summary>
 /// Initializes the configuration control with default settings.
 /// </summary>
 /// <param name="environment"></param>
 public void Initialize(PluginEnvironment environment)
 {
     _data = new DssConfigurationActivityData();
 }