Ejemplo n.º 1
0
        public void ConfigureRunnerForExecution(IGingerRunner runner)
        {
            runner.SetExecutionEnvironment(RunsetExecutionEnvironment, WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <ProjEnvironment>());

            runner.CurrentSolution = WorkSpace.Instance.Solution;
            runner.SolutionAgents  = RepositoryItemHelper.RepositoryItemFactory.GetAllIAgents();
            // runner.PlugInsList = App.LocalRepository.GetSolutionPlugIns();
            runner.DSList = new ObservableList <GingerCore.DataSource.DataSourceBase>();
            runner.SolutionApplications = WorkSpace.Instance.Solution.ApplicationPlatforms;
            runner.SolutionFolder       = WorkSpace.Instance.Solution.Folder;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Should be deleted after switch will be fully done to serialized objects
        /// </summary>
        public ReportInfo(ProjEnvironment Env, IGingerRunner GR, bool ReportOnlyExecuted = false) // to remove after discussion !!!
        {
            mProjEnvironment = Env;
            mBFESs           = GR.GetAllBusinessFlowsExecutionSummary(ReportOnlyExecuted);

            TotalExecutionTime = TimeSpan.FromMilliseconds(GR.Elapsed.GetValueOrDefault());

            DateCreated          = DateTime.Now.ToString();
            DateCreatedShort     = DateTime.Now.ToString("MM/dd");
            ExecutionEnv         = mProjEnvironment.Name;
            ExecutionElapsedTime = TotalExecutionTime;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Should be deleted after switch will be fully done to serialized objects
        /// </summary>
        public ReportInfo(ProjEnvironment Env, BusinessFlow BF, IGingerRunner GR = null) // to remove after discussion !!!
        {
            mProjEnvironment = Env;
            mBFESs           = new ObservableList <BusinessFlowExecutionSummary>();
            BusinessFlowExecutionSummary BFES = new BusinessFlowExecutionSummary();

            BFES.BusinessFlowName           = BF.Name;
            BFES.BusinessFlowRunDescription = BF.RunDescription;
            BFES.Status              = BF.RunStatus;
            BFES.Activities          = BF.Activities.Count;
            BFES.Actions             = BF.GetActionsCount();
            BFES.Validations         = BF.GetValidationsCount();
            BFES.ExecutionVariabeles = BF.GetBFandActivitiesVariabeles(true);
            BFES.BusinessFlow        = BF;
            BFES.Selected            = true;
            if (GR != null)
            {
                BFES.BusinessFlowExecLoggerFolder = GR.ExecutionLogger.ExecutionLogfolder + "\\" + BF.ExecutionLogFolder;
            }

            if (mBFESs != null)
            {
                mBFESs.Clear();
            }
            mBFESs.Add(BFES);

            mGingersMultiRun = null;
            // Set all General info
            if (BF.Elapsed != null)
            {
                TotalExecutionTime = TimeSpan.FromSeconds((long)BF.ElapsedSecs);
            }
            else
            {
                TotalExecutionTime = new TimeSpan(0);
            }

            ExecutionElapsedTime = TotalExecutionTime;
            DateCreated          = DateTime.Now.ToString();
            ExecutionEnv         = mProjEnvironment.Name;
            DateCreatedShort     = DateTime.Now.ToString("MM/dd");
        }
Ejemplo n.º 4
0
 private static void GenerateIndividualReport(IGingerRunner mGR, string template, ProjEnvironment env, bool getReportOnlyForExecutedFlow)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
        public void InitRunner(IGingerRunner runner)
        {
            //Configure Runner for execution
            runner.Status = Amdocs.Ginger.CoreNET.Execution.eRunStatus.Pending;
            ConfigureRunnerForExecution(runner);

            //Set the Apps agents
            foreach (IApplicationAgent p in runner.ApplicationAgents)
            {
                if (p.AgentName != null)
                {
                    ObservableList <IAgent> IAgents = RepositoryItemHelper.RepositoryItemFactory.GetAllIAgents();
                    p.Agent = (from a in IAgents where a.Name == p.AgentName select a).FirstOrDefault();
                }
            }

            //Load the biz flows
            runner.BusinessFlows.Clear();
            foreach (BusinessFlowRun bf in runner.BusinessFlowsRunList)
            {
                ObservableList <BusinessFlow> businessFlows = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <BusinessFlow>();
                BusinessFlow BF1 = (from bfr in businessFlows where bfr.Guid == bf.BusinessFlowGuid select bfr).FirstOrDefault();
                if (BF1 == null)
                {
                    BF1 = (from bfr in businessFlows where bfr.Name == bf.BusinessFlowName select bfr).FirstOrDefault();
                }
                if (BF1 == null)
                {
                    //Reporter.ToUser(eUserMsgKeys.CannontFindBusinessFlow, bf.BusinessFlowName);
                    Reporter.ToLog(eLogLevel.ERROR, string.Format("Can not find the '{0}' {1} for the '{2}' {3}", bf.BusinessFlowName, GingerDicser.GetTermResValue(eTermResKey.BusinessFlow), mRunSetConfig.Name, GingerDicser.GetTermResValue(eTermResKey.RunSet)));
                    continue;
                }
                else
                {
                    // Very slow
                    BusinessFlow BFCopy = (BusinessFlow)BF1.CreateCopy(false);
                    BFCopy.Reset();
                    BFCopy.Active    = bf.BusinessFlowIsActive;
                    BFCopy.Mandatory = bf.BusinessFlowIsMandatory;
                    BFCopy.AttachActivitiesGroupsAndActivities();
                    if (bf.BusinessFlowInstanceGuid == Guid.Empty)
                    {
                        BFCopy.InstanceGuid = Guid.NewGuid();
                    }
                    else
                    {
                        BFCopy.InstanceGuid = bf.BusinessFlowInstanceGuid;
                    }
                    if (bf.BusinessFlowCustomizedRunVariables != null && bf.BusinessFlowCustomizedRunVariables.Count > 0)
                    {
                        foreach (VariableBase varb in BFCopy.GetBFandActivitiesVariabeles(true))
                        {
                            VariableBase runVar = bf.BusinessFlowCustomizedRunVariables.Where(v => v.ParentGuid == varb.ParentGuid && v.ParentName == varb.ParentName && v.Name == varb.Name).FirstOrDefault();
                            if (runVar != null)
                            {
                                RepositoryItemBase.ObjectsDeepCopy(runVar, varb);
                                varb.DiffrentFromOrigin   = runVar.DiffrentFromOrigin;
                                varb.MappedOutputVariable = runVar.MappedOutputVariable;
                            }
                            else
                            {
                                varb.DiffrentFromOrigin   = false;
                                varb.MappedOutputVariable = null;
                            }
                        }
                    }
                    BFCopy.RunDescription = bf.BusinessFlowRunDescription;
                    BFCopy.BFFlowControls = bf.BFFlowControls;
                    runner.BusinessFlows.Add(BFCopy);
                }
            }
        }