/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { base.BeginWork(); #region Assert conditions BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); PipelineId.ShouldNotBeEmpty(); #endregion try { if (!Int32.TryParse(ApplicationConfigurationManager.GetValue(MBulkTaggingWindowSize), out _mWindowSize)) { _mWindowSize = MDefaultWindowSize; } DoBeginWork(BootParameters); } catch (Exception ex) { LogMessage(true, string.Format("Error in TagStartupWorker - Exception: {0}", ex.ToUserString())); ReportToDirector(ex); ex.Trace().Swallow(); } }
protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (ControlSet)XmlUtility.DeserializeObject(BootParameters, typeof(ControlSet)); }
protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (CategorizeAnalysissetInfo)XmlUtility.DeserializeObject(BootParameters, typeof(CategorizeAnalysissetInfo)); }
protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (CreateReviewSetJobBEO)XmlUtility.DeserializeObject(BootParameters, typeof(CreateReviewSetJobBEO)); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { base.BeginWork(); #region Assert conditions BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); PipelineId.ShouldNotBeEmpty(); #endregion try { DoBeginWork(BootParameters); } catch (ApplicationException apEx) { LogMessage(false, apEx.Message); throw; } catch (Exception ex) { LogMessage(false, string.Format("Split Reviewset {0} creation failed. Exception: {1}", _reviewSetRecord.ReviewSetName, ex.Message)); throw; } }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); ReadMatterId(); SetCommiyIndexStatusToInitialized(_matterId); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _documentSource = (DocumentSource)XmlUtility.DeserializeObject(BootParameters, typeof(DocumentSource)); }
protected override void ProcessMessage(PipeMessageEnvelope message) { try { _exportDocumentCollection = (ExportDocumentCollection)message.Body; #region Assertion //Pre Condition PipelineId.ShouldNotBeEmpty(); BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); _exportDocumentCollection.ShouldNotBe(null); _exportDocumentCollection.Documents.ShouldNotBe(null); _exportDocumentCollection.Documents.LongCount().ShouldBeGreaterThan(0); #endregion if (_exportDocumentCollection == null || _exportDocumentCollection.Documents == null) { Tracer.Error("ExportOption Volume Worker: Document detail is not set in pipe message for job run id: {0}", PipelineId); return; } if (_volume == null) { InitializeForProcessing(BootParameters); } CalculateVolume(_exportDocumentCollection.Documents); } catch (Exception ex) { ex.Trace().Swallow(); ReportToDirector(ex); } }
protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(BootParameters, typeof(AnalyticsProjectInfo)); _dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_jobParameter.DatasetId, CultureInfo.CurrentCulture)); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (CreateReviewSetJobBEO)XmlUtility.DeserializeObject(BootParameters, typeof(CreateReviewSetJobBEO)); _jobParameter.ShouldNotBe(null); SetCommiyIndexStatusToInitialized(_jobParameter.MatterId); }
protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(BootParameters, typeof(AnalyticsProjectInfo)); _analyticProject = new AnalyticsProject(); _dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_jobParameter.DatasetId, CultureInfo.CurrentCulture)); _jobParameter.DocumentSource.CollectionId = _dataset.CollectionId; SetCommiyIndexStatusToInitialized(_jobParameter.MatterId); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (CategorizeInfo)XmlUtility.DeserializeObject(BootParameters, typeof(CategorizeInfo)); _batchSize = Convert.ToInt32(ApplicationConfigurationManager.GetValue("UpdateFieldsBatchSize", "AnalyticsProject")); _projectInfo = AnalyticsProject.Get(_jobParameter.MatterId.ToString(CultureInfo.InvariantCulture), _jobParameter.DatasetId.ToString(CultureInfo.InvariantCulture), _jobParameter.ProjectId.ToString(CultureInfo.InvariantCulture)); }
protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (CategorizeInfo)XmlUtility.DeserializeObject(BootParameters, typeof(CategorizeInfo)); _dataset = DataSetBO.GetDataSetDetailForDataSetId(_jobParameter.DatasetId); _projectInfo = AnalyticsProject.Get(_jobParameter.MatterId.ToString(CultureInfo.InvariantCulture), _jobParameter.DatasetId.ToString(CultureInfo.InvariantCulture), _jobParameter.ProjectId.ToString(CultureInfo.InvariantCulture)); SetCommiyIndexStatusToInitialized(_jobParameter.MatterId); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _reprocessJobParameter = (ConversionReprocessJobBeo)XmlUtility.DeserializeObject(BootParameters, typeof(ConversionReprocessJobBeo)); var baseConfig = ReconversionDAO.GetJobConfigInfo(Convert.ToInt32(_reprocessJobParameter.OrginialJobId)); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(baseConfig.BootParameters, typeof(AnalyticsProjectInfo)); _dataset = DataSetBO.GetDataSetDetailForDataSetId(_jobParameter.DatasetId); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(BootParameters, typeof(AnalyticsProjectInfo)); _dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_jobParameter.DatasetId, CultureInfo.CurrentCulture)); _analyticProject = new AnalyticsProject(); _totalDocumentCount = _analyticProject.GetProjectDocumentsCount(Convert.ToInt64(_jobParameter.MatterId, CultureInfo.CurrentCulture), _jobParameter.ProjectCollectionId); _batchSize = Convert.ToInt32(ApplicationConfigurationManager.GetValue("UpdateFieldsBatchSize", "AnalyticsProject")); _projectFieldId = AnalyticsProject.GetProjectFieldId(_jobParameter.MatterId, _dataset.CollectionId); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(BootParameters, typeof(AnalyticsProjectInfo)); _analyticProject = new AnalyticsProject(); _dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_jobParameter.DatasetId, CultureInfo.CurrentCulture)); _totalDocumentCount = _analyticProject.GetSelectedDocumentsCount(_dataset.CollectionId, _jobParameter, WorkAssignment.JobId); //Update job log initial state var jobSummaryKeyValuePairs = new EVKeyValuePairs(); JobMgmtBO.UpdateJobResult(WorkAssignment.JobId, 0, _totalDocumentCount, jobSummaryKeyValuePairs); _documentBachSize = Convert.ToInt32(ApplicationConfigurationManager.GetValue("IncludeDocumentsIntoProjectJobBatchSize", "AnalyticsProject")); _jobParameter.DocumentSource.CollectionId = _dataset.CollectionId; IncreaseProcessedDocumentsCount(_totalDocumentCount); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(BootParameters, typeof(AnalyticsProjectInfo)); _analyticProject = new AnalyticsProject(); _documentBachSize = Convert.ToInt32( ApplicationConfigurationManager.GetValue("IncludeDocumentsIntoProjectInSubSystemJobBatchSize", "AnalyticsProject")); _dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_jobParameter.DatasetId, CultureInfo.CurrentCulture)); _jobParameter.DocumentSource.CollectionId = _dataset.CollectionId; _totalDocumentCount = _analyticProject.GetProjectDocumentsCountByTaskId( Convert.ToInt64(_jobParameter.MatterId, CultureInfo.CurrentCulture), _jobParameter.ProjectCollectionId, _jobParameter.PrimarySystemJobId); //Update job log initial state var jobSummaryKeyValuePairs = new EVKeyValuePairs(); JobMgmtBO.UpdateJobResult(WorkAssignment.JobId, 0, _totalDocumentCount, jobSummaryKeyValuePairs); if (_jobParameter.IsRerunJob || _jobParameter.IsAddAdditionalDocuments) //Rerun job or Add additional documents- need get to get existing IndexId ,if already created { _indexId = AnalyticsProject.GetIndexIdForProject(_jobParameter.MatterId, WorkAssignment.JobId, _dataset.CollectionId, _jobParameter.ProjectCollectionId, false); } if (string.IsNullOrEmpty(_indexId)) { _indexId = "idx-" + Guid.NewGuid().ToString().ToLowerInvariant(); _analyticProject.InsertIndexId(_jobParameter.MatterId, WorkAssignment.JobId, _dataset.CollectionId, _jobParameter.ProjectCollectionId, _indexId); } AnalyticsProject.CreateAnalyticalIndex(_jobParameter.MatterId, WorkAssignment.JobId, _indexId); //Create Index in Spark SVM.. IncreaseProcessedDocumentsCount(_totalDocumentCount); }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _jobParameter = (AnalyticsProjectInfo)XmlUtility.DeserializeObject(BootParameters, typeof(AnalyticsProjectInfo)); _analyticProject = new AnalyticsProject(); _dataset = DataSetBO.GetDataSetDetailForDataSetId(Convert.ToInt64(_jobParameter.DatasetId, CultureInfo.CurrentCulture)); _projectFieldId = AnalyticsProject.GetProjectFieldId(_jobParameter.MatterId, _dataset.CollectionId); _documentBachSize = Convert.ToInt32(ApplicationConfigurationManager.GetValue("IncludeDocumentsIntoProjectJobBatchSize", "AnalyticsProject")); _jobParameter.DocumentSource.CollectionId = _dataset.CollectionId; if (!_jobParameter.IsAddAdditionalDocuments || !string.IsNullOrEmpty(_jobIds)) { return; } _jobIds = GetIncludeJobIds(); }
protected override void ProcessMessage(PipeMessageEnvelope message) { try { _exportDocumentCollection = (ExportDocumentCollection)message.Body; #region Assertion //Pre Condition PipelineId.ShouldNotBeEmpty(); BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); _exportDocumentCollection.ShouldNotBe(null); _exportDocumentCollection.Documents.ShouldNotBe(null); _exportDocumentCollection.Documents.LongCount().ShouldBeGreaterThan(0); #endregion if (_exportDocumentCollection == null) { Tracer.Error("ExportOption File Copy Worker: Pipe message body contains empty data for job run id:{0}", PipelineId); return; } _exportDocumentCollection.Dataset = _dataset; InitializeForProcessing(BootParameters); List <JobWorkerLog <ExportFileCopyLogInfo> > fileCopyLogList; PerformCopy(out fileCopyLogList); //Audit Log InsertAuditLog(_exportDocumentCollection, _exportLoadJobDetailBeo.JobName); #region Send Message Send(); if (fileCopyLogList != null && fileCopyLogList.Count > 0) { SendLog(fileCopyLogList); } #endregion } catch (Exception ex) { ex.Trace().Swallow(); ReportToDirector(ex); } }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { base.BeginWork(); #region Assertion //Pre Condition BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); PipelineId.ShouldNotBeEmpty(); #endregion // Get values from boot parameters.... _mBootParameters = GetPrintDetailsBusinessEntity(BootParameters); _mCollectionId = _mBootParameters.DataSet.CollectionId; _mCreatedBy = _mBootParameters.RequestedBy.UserId; // Mock session MockSession(); }
private int _documentsRetrievalbatchSize; //value set by configuration #endregion #endregion #region OverDrive protected override void BeginWork() { base.BeginWork(); #region Assertion //Pre Condition BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); PipelineId.ShouldNotBeEmpty(); #endregion _batchSize = Convert.ToInt32(ApplicationConfigurationManager.GetValue("ExportBatchSize", "Export")); _documentsRetrievalbatchSize = Convert.ToInt32(ApplicationConfigurationManager.GetValue("ExportGetDocumentsBatchSize", "Export")); #region Load File Initialize(BootParameters); #endregion #region DCB - Restored When DCB Export is migrated to Overdrive /* else if (PipelineType == PipelineType.ExportDcb) * { * _parametersExportDCB = GetExportBEO<ExportDCBJobDetailBEO>((string)BootParameters); * if (_parametersExportDCB != null) * { * //dataset * if (!string.IsNullOrEmpty(_parametersExportDCB.DatasetId) && !string.IsNullOrEmpty(_parametersExportDCB.MatterId)) * { * _dataset = GetDatasetDetails(Convert.ToInt64(_parametersExportDCB.DatasetId), _parametersExportDCB.MatterId); * } * #region ExportOption Option * _exportOption = new ExportOption(); * //Native * if (_parametersExportDCB.ExportDCBFileInfo.ExportDCBFileOption.IncludeNativeFiles) * _exportOption.IsNative = true; * * //Production/Image * if (_parametersExportDCB.ExportDCBFileInfo.PriImgSelection == SetSelection.ProductionSet) * { * _exportOption.IsProduction = true; * _exportOption.ProductionSetCollectionId = _parametersExportDCB.ExportDCBFileInfo.ProdImgCollectionId; * } * else if (_parametersExportDCB.ExportDCBFileInfo.PriImgSelection == SetSelection.ImageSet) * { * _exportOption.IsImage = true; * _exportOption.ImageSetCollectionId = _parametersExportDCB.ExportDCBFileInfo.ProdImgCollectionId; * } * * //Fields * if (_parametersExportDCB.ExportDCBFields.ExportDCBFields != null && _parametersExportDCB.ExportDCBFields.ExportDCBFields.Count > 0) * _exportOption.IsField = true; * * //Tag * if (_parametersExportDCB.ExportDCBTagInfo != null && _parametersExportDCB.ExportDCBTagInfo.IncludeTag) * _exportOption.IsTag = true; * * //Comments * if (_parametersExportDCB.ExportDCBTagInfo != null && (_parametersExportDCB.ExportDCBTagInfo.IncludeTextDocumentComment || _parametersExportDCB.ExportDCBTagInfo.IncludeTextLevelComment)) * _exportOption.IsComments = true; * * if (!string.IsNullOrEmpty(_parametersExportDCB.ExportDCBFileInfo.FilePath)) * _exportOption.ExportDestinationFolderPath = _parametersExportDCB.ExportDCBFileInfo.FilePath; #endregion * #region Set User * if (!string.IsNullOrEmpty(_parametersExportDCB.CreatedBy)) * _createdBy = _parametersExportDCB.CreatedBy; * else * { * Tracer.Error("ExportOption Startup Worker: Job created by user id not specified in boot parameters for job run id:{0}", PipelineId); * //TODO: throw appropriate exception after analysis. * } * MockSession(); #endregion * #region Construct Search Query * _searchQuery = GetSearchQueryForExportDCB(out _reviewsetId, out _isIncludeConceptSearch); #endregion * } * }*/ #endregion try { _totalDocumentCount = SetTotalDocumentsCount(); } catch (Exception ex) { Tracer.Error( "ExportOption Startup Worker: On beginWork failed to set total documents count for job run id:{0}, exception:{1}", PipelineId, ex); LogMessage(false, Constants.FailureInSearch); throw; } if (_totalDocumentCount <= 0) { Tracer.Error("ExportOption Startup Worker: Search return empty records for job run id:{0}", PipelineId); LogMessage(false, Constants.ExportSearchNoRecords); CleanFileResources(); throw new EVException().AddUsrMsg(Constants.ExportSearchNoRecords); } }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); }
protected override void ProcessMessage(PipeMessageEnvelope envelope) { if (envelope.Label == "PleaseFinalize") { FinalizeFiles(); return; } exportDocumentCollection = (ExportDocumentCollection)envelope.Body; #region Assertion //Pre Condition PipelineId.ShouldNotBeEmpty(); BootParameters.ShouldNotBe(null); BootParameters.ShouldBeTypeOf <string>(); exportDocumentCollection.ShouldNotBe(null); exportDocumentCollection.Documents.ShouldNotBe(null); exportDocumentCollection.Documents.LongCount().ShouldBeGreaterThan(0); #endregion exportDocumentCollection.Dataset = _dataset; try { if (parametersExportLoadFile == null) { InitializeForProcessing(BootParameters); } GetDocumentFields(exportDocumentCollection.Documents); #region Get Content-Field value from Text file GetDocumentsContentField(); #endregion if (exportDocumentCollection.ExportOption.IsImage || exportDocumentCollection.ExportOption.IsProduction) { //Set Images File Path.. var loadFileHelper = new ExportLoadFileHelper(BootParameters); Parallel.ForEach(exportDocumentCollection.Documents, new ParallelOptions { MaxDegreeOfParallelism = _maxParallelThread }, (docDetail) => loadFileHelper.SetImageSourceFiles(docDetail, exportDocumentCollection.ExportOption)); } var fileWriterLogList = WriteLoadFiles(); #region Send Log if (fileWriterLogList != null && fileWriterLogList.Any()) { //Send to Log pipe SendLog(fileWriterLogList); } #endregion documentContentFieldsValueCollection.Clear(); } catch (Exception ex) { ex.Trace().Swallow(); ReportToDirector(ex); } }
/// <summary> /// Begins the work. /// </summary> protected override void BeginWork() { BootParameters.ShouldNotBe(null); base.BeginWork(); _trainingSetParameter = (ExampleSet)XmlUtility.DeserializeObject(BootParameters, typeof(ExampleSet)); }