/// <summary> /// This method is used to save the converted actions and save the businessflow /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private async void SaveButtonClicked(object sender, RoutedEventArgs e) { mConversionProcess.ConversionProcessStarted(); await Task.Run(() => { foreach (BusinessFlowToConvert bf in xBusinessFlowGrid.DataSourceList) { try { if (bf.IsSelected && bf.SaveStatus != eConversionSaveStatus.NA) { if (bf.ConvertedActionsCount > 0) { bf.SaveStatus = eConversionSaveStatus.Saving; WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(bf.BusinessFlow); bf.SaveStatus = eConversionSaveStatus.Saved; } else { bf.SaveStatus = eConversionSaveStatus.NA; } } } catch (Exception ex) { bf.SaveStatus = eConversionSaveStatus.Failed; Reporter.ToLog(eLogLevel.ERROR, "Error occurred while trying to Save - ", ex); } } }); mConversionProcess.ConversionProcessEnded(); }