Design Document
There are two screen available for Batch Processing,
1) Meta Data Screen - It contains the meta data which are required for preforming the Batch process.
2) Batch Processing - It is the actual screen where Batch processing is initiated.
Meta Data Screen:
This Meta Data screen captures all the information required for the Batch Process.
Image Removed
Batch Processing Screen:
Here in this screen once the Meta Data is selected Batch Type and Profile Type are populated in readonly mode, then the files are selected for the Batch process.
Image Removed
Detailed Explanation for Meta Data Screen:
User can fill data in Metadata screen, for example if user wants to create metadata for staff upload with YBP profile need to fill meta data as follows.
Image Removed
If user selects Import/Export Type as schedule, system will display schedule field set dynamically.
At schedule field set there is an option called Schedule type with radio buttons, in this if user selects Every day system dynamically displays start time as follows.
Image Removed
If user selects another option in the schedule type as Weekly, in schedule field set system dynamically changes the screen and displays the Weekdays with start time as follows.
Image Removed
If user selects another option in the schedule type as Monthly, in schedule field set system dynamically changes the screen and displays as follows
Image Removed
At Batch Type If user selects other than Batch Delete system dynamically displays field sets for Matching point, Mapping field, Protected Fields, Delete Fields, Profile attributes and a checkbox option for Ignore GPF(Globally Protected Fields).
Image Removed
If user selects Batch Delete in Batch Type System dynamically displays Batch delete Field set as follows.
Image Removed
Detailed Explanation For Batch Ingest Screen :
In Batch Ingest Screen if user selects Batch code for other than Batch delete System dynamically displays as following Image.
Here User can upload files to perform operations like Staff Upload, Import Bib, Patron Ingest, Location Ingest etc.
Image Removed
In Batch Ingest Screen if user selects Batch code for Batch delete System dynamically displays Batch Delete Field set as following Image.
Here user can ingest files to perform batch delete.
Image Removed
Class Diagram for Batch Processing :
...
Deck |
---|
|
Card |
---|
| DescriptionBatch operations are defined and the architecture is laid out in this section. Defining a batch operation begins with the definition of the batch profile and involves definition of various sections that cover different aspects of the batch job. Apart for defining the batch profile, the user may also define specific KRMS profile xml files, various maintenance documents for data mapping and define CRON schedules. The execution of the batch job varies based on options selected in the profile. Current implementation of batch jobs covers ingest of bib, order, invoice, location and patron data as well as bib overlay and export of data including bibs, order and invoices. Other data operations such as deletions, 'Globally Protected Field' definition and overlays may also be covered in this definition. |
Card |
---|
| Design TechnicalImage Added - Psuedo Code
- User creates a batch profile using the options provided in batch profile screen
- User create a batch process through batch process screen by selecting the profile to execute the output file, batch size and email id for the report
- User clicks on run now to execute the batch immediately.
- OLEBatchProcessDefinitionDocument creates the process definition document and call s the OLEBatchSchedulerService, which starts the job by executing the OLEBatchProcessAdhocStep step
- In OLEBatchProcessAdhocStep the BatchProcessFactory is invoked with the process type based on which the appropriate process is created
- The processBatch(OLEBatchProcessDefinitionDocument processDef,OLEBatchProcessJobDetailsBo jobBo) method is called to perform the batch process as per the profile information provided by the user.
- BatchProcessExportData
This batchprocess is involved in performing export of bib / intance information based on the profile provided by the user. It has the following methods:- loadProfile(OLEBatchProcessDefinitionDocument processdef)
- Performs the profile data load from the database as per the profile id provided in the process definition document
- In case of Incremental export, the last export job details is retrieved and that value is used when data is queried in prepareForRead() and getNextBatch() methods
- prepareForRead()
- Reads the initial set of data for Export using solr query based on the profile information such as Data to export, filters etc.
- Calls the ExportDataService.getExportDataBySolr(List<SolrDocument> solrDocumentList, OLEBatchProcessProfileBo profile) method with the solr result and the profile and does the bib checkout for each solr document
- If the data to export is Bib only only the checkout bib is processed else if the data to export is BibAndInstance all instance data that belong to the bib is checked out
- Instance data checkout is verified whether it is a conventional Instance or an EInstance and processed accordingly
- Holding and Item mapping provided are used for mapping the holding and item information into datafileds and subfields
- All the data retrieved is added to the BibliographicRecord and is converted to xml format and returned
- prepareForWrite()
- Identifies the user given path (from process definition document) where the output file shall be written to, if the path is valid and the system can write the file it will write the output to the said location, else it will output the file to a default location and location will be specified in the job report
- processBatch()
- Data retrived using prepareForRead() and getNextBatch() batch method is written to file as a mrc file or xml depending on the process definition document data
- performs the write operation of the batch export and updates the success, failure and totalcount of the job
- getNextBatch()
- If there are more batches of data to be exported this method retrieves the next set of data
- performs all steps that take place in prepareForRead() method
- And calls processBatch() method to perform the batch export
- updateJobProgress()
- Updates the job record with details such as time taken, record count and status
- BatchProcessOrderRecordData
This BatchProcessOrderRecordData performs order record ingest and creates Requisitions and Purchase Orders based on the batchProcessProfile selected by the user.
getFileContent(BatchProcessJobBO batchProcessJobBO) This method takes content from the ingested mrc and edi files.
validateFile(String mrcFileName, String ediFileName, String xmlFileName) This method takes file names and validate these files to perform orderRecord.
if(true) ingestOrderRecord(BatchProcessProfile batchProcessProfile, BatchProcessJobBO batchProcessJobBO) This method takes batchProcessProfile and batchProcessJobBO as parameters and load mrc and edi files content into IngestRecord object. isPreProcessingRequired(MultipartFile marcFile, MultipartFile ediFile) This method checks file extensions returns boolean start(IngestRecord ingestRecord, BatchProcessProfile BatchProcessProfile) This method performs order record operation. else Displays error message. - BatchProcessLocationIngestData
This BatchProcessLocationIngestData gets location details from XMl and stores in db. getFileContent(BatchProcessJobBO batchProcessJobBO) This method takes content from the ingested mrc and edi files.
validateFile(String xmlFileName) This method takes file names and validates whether ingested file is xml or not. if(true) validateContentsAgainstSchema(InputStream inputStream) persistLocationFromFileContent(String fileContent,String locationFileName); This method persist location details into db. else Displays error message. - BatchProcessPatronIngestData
This BatchProcessPatronIngestData gets location details from XMl and stores in db. getFileContent(BatchProcessJobBO batchProcessJobBO) This method takes content from the ingested mrc and edi files.
validateFile(String xmlFileName) This method takes file names and validates whether ingested file is xml or not. if(true) validateContentsAgainstSchema(InputStream inputStream) persistLocationFromFileContent(String fileContent, boolean addUnMatchedPatronFlag, String fileName, OlePatronIngestSummaryRecord olePatronIngestSummaryRecord, String addressSource, String userName);
This method persist location details into db. else Displays error message.
Service ContractsService Implementation |
Card |
---|
| ER Diagram:BATCH PROCESS PROFILE Image Added BATCH PROCESS Image Added |
Card |
---|
| UI Screen
Image Added Image Added Image Added |
Card |
---|
| Data ModelEntity : BATCH DEFINITION Name | Max Len | Data Type | Default Value | Input Type | Action Event | Action Event Function Name | Validation Type | Tab Index | Remarks | | | | | | | | | | | | | | | | | | | | |
|
|