Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.77 KB

File metadata and controls

31 lines (18 loc) · 1.77 KB

Purchase Order import

Import of business document scenario

In this scenario we parse a formal business document describing purchase order. The BusinessDocParser therefore belongs to the domain.

In this scenario we want to handle purchase orders of infinite (unlimited) size. Imported data structures are big and complex. Here we present a technique of direct access to the store without core tier mediation.

We use Validator to perform basic validation on imported data structures.

Import PO UseCase Sequence

Benefits

  • We don't have to leak technical details such as reactivity or stream based API in order to achieve scalability.
  • Plain CRUD functionality (import) is kept separate from business logic (in app).

Downsides

  • Business parser requires additional intermediate data model for parsed structure. This is a waste.

Import using local parser

JPA variant

We can save some by giving up with business parser. Instead, we parse business document locally in the app tier. With this approach we can use JPA datamodel directly when parsing.

Import PO UseCase Sequence

Plain JDBC variant

Import process can be further simplified and speed upm by using plain JDBC calls instead of JPA.

Import PO UseCase Sequence