Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


RolePersonComments
Solution Architect
Java Lead
UI Lead
Product Owner

...

General Flow Diagram part 1:

Image RemovedImage Added


General Flow Diagram part 2:

Image RemovedImage Added


This ER diagram represents the data model for the new module.

Image RemovedImage Added

  • bulk_operation - this is the main table that represents any Bulk Operation.

  • buld_operation_rule - this table contains the rules that are/will be applied to a particular Bulk Operation in the case of the In-App approach for data modification.

  • buld_operation_rule_details - this table contains the rules details
  • bulk_operation_data_processing - this table represents the state of the data processing operation when records retrieved from the Export Manager are processed according to the rules defined for a particular Bulk Operation. In the case of errors, this operation could be resumed.

  • bulk_operation_execution - this table represents an attempt to apply the changes to the target storage module. The changes are applied in chunks.

  • bulk_operation_execution_chunk - this table represents the chunk of the modified records that are sent to the target storage module to be stored.

  • bulk_operation_execution_content - this table holds the information for every particular modified record regarding if it has been successfully updated or not.


...

  • Bulk Operation Controller - this component represents all end-points for the Bulk Operation beck-end module.
  • Bulk Operation Service - it contains the implementation of all business logic for the Bulk Operation application.
  • Error Handler Service - this component is responsible for error handling and storing errors in the database for further audit/analysis
  • Thread Pool Executor - the component used by the Bulk Operation Service to run asynchronous tasks 
  • Kafka consumer - this component receives messages from the Data Export Manager it sends on completing the data export job. Once receives a message, the Kafka consumer passes control to the Bulk Operation Service.
  • Data Export Client - it encapsulates the details of the HTTP interaction with the Data Export Manager.
  • Remote File System Client - it encapsulates the details of interaction with S3-like storage that is available to all instances of the module.
  • Bulk Operation Repository - it is a set of JPA repositories used to deal with the database.
  • Mod Client - it is a set of clients that encapsulate the details of HTTP interaction with storage modules like mod-users, mod-inventory-storage, etc.
  • Mod Client<T> - it is a generalized interface used by the Bulk Operation Service to retrieve actual data from different storage modules.
  • Mod Client Adapter - this is a set of adapters used to cast Mod Clients to Mod Client<T> for Bulk Operation Service.
  • Mod Client Adapter Factory - it is a component used to produce Mod Client Adapters by entity type.
  • Data Processor<T> - this is a generalized interface used by the Bulk Operation Service to process a file with records using the rules specified by a user.
  • Data Processor - this is a set of components that implement the logic for file processing for different entities.  
  • Data Processor Factory - this is a component used to produce Data Processors by entity type.
  • Process Callback - this interface is used by the Data Processors to update the progress of processing. Bulk Operation Service implements this interface.
  • Update Processor<T> - this is a generalized interface used by the Bulk Operation Service to update records in storage modules.
  • Update Processor - it is a set of components that implement the logic for updating records in storage modules using a file as a source. Each Update Processor uses a corresponding Mod Client to perform HTTP calls to an appropriate backend module.
  • Update Processor Factory - this is a component used by the Bulk Operation Service to produce Update Processors by entity type.

Unified table representation of data.

For the sake of simplicity, the back-end module uses the unified data structure to represent data for preview. It means that the UI application does not need to know the exact data type and/or data structure used to represent a particular type of entity. It simply receives the unified tabular data structure and renders the preview table for a user.

Below is the class diagram that represents the data structures used for that.Image Removedstructures used for that.

Image Added

It makes sense to consider the usage of Query tool data structure to represent the results and preview to users.

BuklEditController implementation details

Existing endpointNew endpointRequestResponseNotes
/bulk-edit/{jobId}/upload/bulk-edit/{jobId}/uploadcsv-file-
/bulk-edit/{jobId}/item-content-update/upload
/bulk-edit/{operationId}/content-update/

Collection<BulkOperationRule>
csv-file with preview of updated data (changes aren't committed yet)


/bulk-edit/{jobId}/user-content-update/upload
/bulk-edit/{jobId}/holdings/content-update/upload
/{jobId}/preview/updated-items/download/{operationId}/preview/download-csv-file with updated data (changes are committed and applied)


/bulk-edit/{jobId}/preview/updated-users/download
/bulk-edit/{jobId}/preview/updated-holdings/download
/bulk-edit/{jobId}/preview/users/bulk-edit/{operationId}/preview/-UnifiedTable


/bulk-edit/{jobId}/preview/items
/bulk-edit/{jobId}/preview/holdings
/bulk-edit/{jobId}/preview/errors/bulk-edit/{operationId}/preview/errorsCQL-queryErrorsReturns list of errors, supports CQL-query for searching and filtering bulk operations.
/bulk-edit/{jobId}/start/bulk-edit/{operationId}/start-BulkOperation
/bulk-edit/{jobId}/roll-back




/bulk-edit/operationsCQL-queryCollection<BulkOperation>Returns list of bulk operations, supports CQL-query for searching and filtering bulk operations.

BuklEditService implementation details