In this chapter we'll look at building a decision service for validating a domain model. By writing a set of rules we'll be separating the validation logic from the rest of the system. This set of rules can then be reused in other systems. For example, it may be used as a part of the service layer in a web application, but is also used as a part of high-performance batch application for processing large volumes of data.
Before we start with validation we'll define a simple banking domain model that will be used in examples throughout this book.
The UML diagram of this model is shown in the next screenshot. It defines four entities: