Ejemplo n.º 1
0
 public ActivityGroupReport(ActivitiesGroup AG, GingerCore.BusinessFlow BF)
 {
     mActivitiesGroup = AG;
     if ((AG != null) && (AG.ExecutedActivities != null))
     {
         this.ExecutedActivitiesGUID = AG.ExecutedActivities.Select(x => x.Key).ToList();
     }
 }
Ejemplo n.º 2
0
        public ExecutionSummaryPage(GingerCore.BusinessFlow businessFlow)
        {
            InitializeComponent();

            this.Title = GingerDicser.GetTermResValue(eTermResKey.BusinessFlow) + " Execution Summary";

            // TODO: Complete member initialization
            this.mBusinessFlow     = businessFlow;
            lblBizFlowName.Content = mBusinessFlow.Name;

            ShowStatus();

            lblElapsed.Content = "Elapsed (Seconds): " + mBusinessFlow.ElapsedSecs;
            ShowPie();
        }
Ejemplo n.º 3
0
        public override void ExportBfActivitiesGroupsToALM(GingerCore.BusinessFlow businessFlow, ObservableList <ActivitiesGroup> grdActivitiesGroups)
        {
            bool askToSaveBF = false;

            foreach (ActivitiesGroup group in grdActivitiesGroups)
            {
                if (ExportActivitiesGroupToALM(group))
                {
                    askToSaveBF = true;
                }
            }

            if (askToSaveBF)
            {
                if (Reporter.ToUser(eUserMsgKey.AskIfToSaveBFAfterExport, businessFlow.Name) == Amdocs.Ginger.Common.eUserMsgSelection.Yes)
                {
                    Reporter.ToStatus(eStatusMsgKey.SaveItem, null, businessFlow.Name,
                                      GingerDicser.GetTermResValue(eTermResKey.BusinessFlow));
                    WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(businessFlow);
                    Reporter.HideStatusMessage();
                }
            }
        }
Ejemplo n.º 4
0
        public override void ExportBfActivitiesGroupsToALM(GingerCore.BusinessFlow businessFlow, ObservableList <GingerCore.Activities.ActivitiesGroup> grdActivitiesGroups)
        {
            bool askToSaveBF = false;

            foreach (ActivitiesGroup group in grdActivitiesGroups)
            {
                if (ExportActivitiesGroupToALM(group))
                {
                    askToSaveBF = true;
                }
            }

            if (askToSaveBF)
            {
                if (Reporter.ToUser(eUserMsgKeys.AskIfToSaveBFAfterExport, businessFlow.Name) == MessageBoxResult.Yes)
                {
                    Reporter.ToGingerHelper(eGingerHelperMsgKey.SaveItem, null, businessFlow.Name,
                                            GingerDicser.GetTermResValue(eTermResKey.BusinessFlow));
                    WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(businessFlow);
                    Reporter.CloseGingerHelper();
                }
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Check if the Activity supposed to be executed according to it variables dependencies configurations
        /// </summary>
        /// <param name="parentActivity">The Activity parent Business Flow</param>
        /// <param name="setActivityStatus">Define of to set the Activity Status value in case the check fails</param>
        /// <returns></returns>
        public bool?CheckIfVaribalesDependenciesAllowsToRun(BusinessFlow parentBusinessFlow, bool setActivityStatus = false)
        {
            bool?checkStatus = null;

            try
            {
                //check objects are valid
                if (parentBusinessFlow != null)
                {
                    //check if the Activities-variables dependencies mechanisem is enabled
                    if (parentBusinessFlow.EnableActivitiesVariablesDependenciesControl)
                    {
                        //check if the Activity configured to run with all BF selection list variables selected value
                        List <VariableBase> bfListVars = parentBusinessFlow.Variables.Where(v => v.GetType() == typeof(VariableSelectionList) && v.Value != null).ToList();
                        if (bfListVars != null && bfListVars.Count > 0)
                        {
                            foreach (VariableBase listVar in bfListVars)
                            {
                                VariableDependency varDep = null;
                                if (this.VariablesDependencies != null)
                                {
                                    varDep = this.VariablesDependencies.Where(avd => avd.VariableName == listVar.Name && avd.VariableGuid == listVar.Guid).FirstOrDefault();
                                }
                                if (varDep == null)
                                {
                                    varDep = this.VariablesDependencies.Where(avd => avd.VariableGuid == listVar.Guid).FirstOrDefault();
                                }
                                if (varDep != null)
                                {
                                    if (!varDep.VariableValues.Contains(listVar.Value))
                                    {
                                        checkStatus = false;//the Selection List variable selected Value was not configured on the Activity
                                        break;
                                    }
                                }
                                else
                                {
                                    checkStatus = false;//the Selection List variable was not configured on the Activity
                                    break;
                                }
                            }
                            if (checkStatus == null)
                            {
                                checkStatus = true;//All Selection List variable selected values were configured on the Activity
                            }
                        }
                        else
                        {
                            checkStatus = true;//the BF dont has Selection List variables
                        }
                    }
                    else
                    {
                        checkStatus = true;//the mechanisem is disabled
                    }
                }
                else
                {
                    checkStatus = false; //BF object is null
                }
                //Check failed
                if (checkStatus == false && setActivityStatus == true)
                {
                    this.Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Skipped;
                }

                return(checkStatus);
            }
            catch (Exception ex)
            {
                //Check failed
                if (setActivityStatus)
                {
                    this.Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Skipped;
                }
                Reporter.ToLog(eLogLevel.ERROR, $"Method - {MethodBase.GetCurrentMethod().Name}, Error - {ex.Message}", ex);
                return(false);
            }
        }