Let's now look in more detail at the individual layers. The following diagram also gives us an overview of what we'll be implementing in this chapter. Again, from bottom to top, we'll have two repositories—one for persisting customers and one for accounts. The services layer will have our three already defined services—validation, loan approval, and CEP service. These services will be hidden behind a public BankingService, which will act as a mediator between these services. The presentation tier will use this public service to do all of its tasks. There will be various controllers—each responsible for some unit of work (for example, CustomerSaveFormController for saving a customer). The presentation tier will also contain a WS-HumanTask client that will be responsible for all communication with the WS-HumanTask server. The sample application design diagram is as follows:
In the persistence layer, only the CustomerRepository will be normally used. It will persist the whole object graph...