/// <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; } }