コード例 #1
0
        private List <BusinessFlowReport> GetBziFlowsReport()
        {
            List <BusinessFlowReport> list = new List <BusinessFlowReport>();
            int BizFlowNumber = 0;

            foreach (BusinessFlowExecutionSummary BFES in mBFESs)
            {
                BizFlowNumber++;
                BusinessFlowReport BFR = new BusinessFlowReport(BFES);
                BFR.Seq = BizFlowNumber;
                list.Add(BFR);
            }
            return(list);
        }
コード例 #2
0
        private void ReplaceVariableTemplate(ref string BusinessFlowData, BusinessFlowReport BFR)
        {
            StringBuilder VariablesData    = new StringBuilder();
            string        VariableTemplate = GetStringBetween(BusinessFlowData, "<!--VariableStart-->", "<!--VariableEnd-->");

            if (string.IsNullOrEmpty(VariableTemplate))
            {
                return;
            }
            for (int i = 0; i < BFR.Variables.Count; i++)
            {
                string VariableData = VariableTemplate.Replace("Variables[i]", "Variables[" + i + "]");
                VariablesData.Append(VariableData);
            }
            BusinessFlowData = BusinessFlowData.Replace("<!--VariableStart-->" + VariableTemplate + "<!--VariableEnd-->", VariablesData.ToString());
        }
コード例 #3
0
        private void ReplaceActivityTemplate(ref string BusinessFlowData, BusinessFlowReport BFR)
        {
            var ActivitiesData   = "";
            var ActivityTemplate = GetStringBetween(BusinessFlowData, "<!--ActivityStart-->", "<!--ActivityEnd-->");

            if (string.IsNullOrEmpty(ActivityTemplate))
            {
                return;
            }

            for (var i = 0; i < BFR.Activities.Count; i++)
            {
                var ActivityData = ReplaceDataDyncmically(BFR.Activities[i], ActivityTemplate,
                                                          @"BusinessFlows[i].Activities[i]");
                ReplaceActionTemplate(ref ActivityData, BFR.Activities[i]);
                ActivitiesData += ActivityData;
            }
            BusinessFlowData = BusinessFlowData.Replace(
                "<!--ActivityStart-->" + ActivityTemplate + "<!--ActivityEnd-->", ActivitiesData);
        }
コード例 #4
0
        private void ReplaceVariableTemplate(ref string BusinessFlowData, BusinessFlowReport BFR)
        {
            var VariablesData    = "";
            var VariableTemplate = GetStringBetween(BusinessFlowData, "<!--VariableStart-->", "<!--VariableEnd-->");

            if (string.IsNullOrEmpty(VariableTemplate))
            {
                return;
            }
            for (var i = 0; i < BFR.Variables.Count; i++)
            {
                var VariableData = VariableTemplate.Replace("BusinessFlows[i].Variables[i].Seq",
                                                            BFR.Variables[i].Seq.ToString());
                VariableData = ReplaceDataDyncmically(BFR.Variables[i], VariableTemplate,
                                                      @"BusinessFlows[i].Variables[i]");
                VariablesData += VariableData;
            }
            BusinessFlowData = BusinessFlowData.Replace(
                "<!--VariableStart-->" + VariableTemplate + "<!--VariableEnd-->", VariablesData);
        }
コード例 #5
0
        protected string BizFlowHTMLColumns(BusinessFlowReport BFR)
        {
            BusinessFlow BF = (BusinessFlow)BFR.GetBusinessFlow();
            XElement     xe = new XElement("div", BF.Name);

            xe.Add(new XElement("td", BF.ElapsedSecs));

            XElement xstatus = new XElement("td", BF.RunStatus);

            if (BF.RunStatus == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Passed)
            {
                xstatus.SetAttributeValue("bgColor", "green");
            }
            else
            if (BF.RunStatus == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Failed)
            {
                xstatus.SetAttributeValue("bgColor", "red");
            }

            xe.Add(xstatus);
            return(xe.ToString());
        }
コード例 #6
0
        private void ReplaceActivityTemplate(ref string BusinessFlowData, BusinessFlowReport BFR)
        {
            StringBuilder ActivitiesData   = new StringBuilder();
            string        ActivityTemplate = GetStringBetween(BusinessFlowData, "<!--ActivityStart-->", "<!--ActivityEnd-->");

            if (string.IsNullOrEmpty(ActivityTemplate))
            {
                return;
            }

            for (int i = 0; i < BFR.Activities.Count; i++)
            {
                //If activity is skipped, then not put into the report
                if (IgnoreSkippedAct && BFR.Activities[i].Status == "Skipped")
                {
                    continue;
                }
                string ActivityData = ActivityTemplate.Replace("Activities[i]", "Activities[" + i + "]");
                ReplaceActionTemplate(ref ActivityData, BFR.Activities[i]);
                ActivitiesData.Append(ActivityData);
            }
            BusinessFlowData = BusinessFlowData.Replace("<!--ActivityStart-->" + ActivityTemplate + "<!--ActivityEnd-->", ActivitiesData.ToString());
        }