public int Build()
        {
            // force to true for now

            ReportGenerationBatch reportGenerationBatch = new ReportGenerationBatch();

            reportGenerationBatch.Name = this._period + " - " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss");
            reportGenerationBatch.Period = this._period;

            ReportGenerationQueue reportGenerationQueue = new ReportGenerationQueue();

            reportGenerationQueue.ReportId = this._reportId;
            reportGenerationQueue.ExecutionLog = string.Empty;
            reportGenerationQueue.MustDeliverReportToTestLocation = this._MustDeliverReportToTestLocation;
            reportGenerationQueue.NumberOfRetries = 0;
            reportGenerationQueue.Period = this._period;
            reportGenerationQueue.QueryText = string.Empty;
            reportGenerationQueue.ReforecastQuarterName = this._reforecastQuarterName;
            reportGenerationQueue.ReportGenerationStatus = BusinessLayer.Automation.Enums.ReportStatus.Queued;

            reportGenerationBatch.ReportGenerationQueues.Add(reportGenerationQueue);

            if (this._generationDao.CanSubmitChanges())
            {
                this._generationDao.SubmitChanges();
            }

            this._generationDao.Insert<ReportGenerationBatch>(reportGenerationBatch);

            if (this._generationDao.CanSubmitChanges())
            {
                this._generationDao.SubmitChanges();
            }

            return reportGenerationQueue.ReportGenerationQueueId;
        }
        /// <summary>
        /// Starts the generation process.
        /// </summary>
        /// <param name="generationDao">The generation DAO.</param>
        /// <param name="queuedReport">The queued report.</param>
        private void StartGenerationProcess(GenerationDao generationDao, ReportGenerationQueue queuedReport)
        {
            this.ReportQueueStatusService.UpdateReportGenerationQueue(new ReportGenerationQueueStatusDto()
            {
                ReportGenerationQueueId = queuedReport.ReportGenerationQueueId,
                ReportStatus = ReportStatus.Processing
            });

            IHostedProcess hostedApp = this.LaunchProcess(queuedReport.ReportGenerationQueueId);

            this._reportGeneratorEngineList.Add(hostedApp);
        }
Ejemplo n.º 3
0
		private void detach_ReportGenerationQueues(ReportGenerationQueue entity)
		{
			this.SendPropertyChanging();
			entity.ReportGenerationBatch = null;
		}
Ejemplo n.º 4
0
		private void attach_ReportGenerationQueues(ReportGenerationQueue entity)
		{
			this.SendPropertyChanging();
			entity.Report = this;
		}