Example #1
0
        public void HandleMessage(FinalExecutionCommand command)
        {
            Logger.DebugFormat("Received message command of type {0} ", command.GetType());

            var statusReport = new ReportStatus();

            try
            {
                NHibernateHelper.CreateSession();
                Logger.Debug("Nhibernate session created");

                ProcessGenerateFinalExceutionReportCommand(command, statusReport);

                NHibernateHelper.CloseSession();
                Logger.Debug("Nhibernate close session");
            }
            catch (Exception e)
            {
                statusReport.Error = true;
                Logger.Error(e);
                ReportService.NotifyError(command, e.Message);

                throw;
            }
        }
Example #2
0
        private void ProcessGenerateFinalExceutionReportCommand(FinalExecutionCommand command, ReportStatus statusReport)
        {
            var reportExecution = ReportService.GenerateFinalExcecutionReport(command, statusReport);

            ReportService.SendReport(reportExecution, "Reporte de Ejecucion");
        }