Ejemplo n.º 1
0
        internal static AgentJobStep ConvertToAgentJobStep(JobStep step, LogSourceJobHistory.LogEntryJobHistory logEntry, string jobId)
        {
            AgentJobStepInfo stepInfo = new AgentJobStepInfo();

            stepInfo.JobId         = jobId;
            stepInfo.JobName       = logEntry.JobName;
            stepInfo.StepName      = step.Name;
            stepInfo.SubSystem     = step.SubSystem;
            stepInfo.Id            = step.ID;
            stepInfo.FailureAction = step.OnFailAction;
            stepInfo.SuccessAction = step.OnSuccessAction;
            stepInfo.FailStepId    = step.OnFailStep;
            stepInfo.SuccessStepId = step.OnSuccessStep;
            stepInfo.Command       = step.Command;
            stepInfo.CommandExecutionSuccessCode = step.CommandExecutionSuccessCode;
            stepInfo.DatabaseName     = step.DatabaseName;
            stepInfo.DatabaseUserName = step.DatabaseUserName;
            stepInfo.Server           = step.Server;
            stepInfo.OutputFileName   = step.OutputFileName;
            stepInfo.RetryAttempts    = step.RetryAttempts;
            stepInfo.RetryInterval    = step.RetryInterval;
            stepInfo.ProxyName        = step.ProxyName;
            AgentJobStep jobStep = new AgentJobStep();

            jobStep.stepId      = logEntry.StepID;
            jobStep.stepName    = logEntry.StepName;
            jobStep.stepDetails = stepInfo;
            jobStep.message     = logEntry.Message;
            jobStep.runDate     = step.LastRunDate.ToString();
            jobStep.runStatus   = (Contracts.CompletionResult)step.LastRunOutcome;
            return(jobStep);
        }
Ejemplo n.º 2
0
        public static AgentJobStep ConvertToAgentJobStep(ILogEntry logEntry, DataRow jobRow)
        {
            var          entry     = logEntry as LogSourceJobHistory.LogEntryJobHistory;
            string       stepId    = entry.StepID;
            string       stepName  = entry.StepName;
            string       message   = entry.Message;
            DateTime     runDate   = logEntry.PointInTime;
            int          runStatus = Convert.ToInt32(jobRow[UrnRunStatus], System.Globalization.CultureInfo.InvariantCulture);
            AgentJobStep step      = new AgentJobStep();

            step.StepId    = stepId;
            step.StepName  = stepName;
            step.Message   = message;
            step.RunDate   = runDate;
            step.RunStatus = runStatus;
            return(step);
        }
Ejemplo n.º 3
0
        public static AgentJobStep ConvertToAgentJobStep(ILogEntry logEntry, DataRow jobRow)
        {
            var          entry     = logEntry as LogSourceJobHistory.LogEntryJobHistory;
            string       stepId    = entry.StepID;
            string       stepName  = entry.StepName;
            string       message   = entry.Message;
            DateTime     runDate   = logEntry.PointInTime;
            int          runStatus = logEntry.Severity == SeverityClass.Success ? 1 : 0;
            AgentJobStep step      = new AgentJobStep();

            step.StepId    = stepId;
            step.StepName  = stepName;
            step.Message   = message;
            step.RunDate   = runDate;
            step.RunStatus = runStatus;
            return(step);
        }