/// <summary> /// Generates the message. /// </summary> /// <returns></returns> protected override bool GenerateMessage() { _analyticProject = new AnalyticsProject(); var totalDocument = 0; try { var projectDocument = _analyticProject.GetProjectDocumentsCount(_jobParameter.MatterId, _projectInfo.ProjectCollectionId); totalDocument = projectDocument; //Step 1 : Categorize Document var categorizedResultDocuments = _analyticProject.CategorizeProjectDocuments(_jobParameter.MatterId, _jobParameter.DatasetId, _jobParameter.ProjectId, WorkAssignment.JobId, _jobParameter.CreatedBy); //Step 2: Send documents to next worker for Update Fields if (categorizedResultDocuments != null) { SendDocumentsForUpdate(categorizedResultDocuments); } return true; } catch (Exception ex) { //Update Job Status _analyticProject.UpdateJobResult(WorkAssignment.JobId, 0, totalDocument); ex.Trace().Swallow(); throw; } }
/// <summary> /// Generates the message. /// </summary> /// <returns></returns> protected override bool GenerateMessage() { _analyticProject = new AnalyticsProject(); var totalDocument = 0; try { var projectDocument = _analyticProject.GetProjectDocumentsCount(_jobParameter.MatterId, _projectInfo.ProjectCollectionId); totalDocument = projectDocument; //Step 1 : Categorize Document var categorizedResultDocuments = _analyticProject.CategorizeProjectDocuments(_jobParameter.MatterId, _jobParameter.DatasetId, _jobParameter.ProjectId, WorkAssignment.JobId, _jobParameter.CreatedBy); //Step 2: Send documents to next worker for Update Fields if (categorizedResultDocuments != null) { SendDocumentsForUpdate(categorizedResultDocuments); } return(true); } catch (Exception ex) { //Update Job Status _analyticProject.UpdateJobResult(WorkAssignment.JobId, 0, totalDocument); ex.Trace().Swallow(); throw; } }
/// <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)); _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); }