O'Reilly logo

Drools JBoss Rules 5.0 Developer's Guide by Michal Bali, Bogdan Brinzarea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Analysis

After reading the above problem definition, it seems that each line from the list represents a single rule. The rules are simple—few conditions and a consequence. The consequence will report a customer that failed a validation rule. Two types of messages will be used—error and warning.

We'll now define a report model that will store this information. The model might look like the following figure:

Analysis

As it can be seen in the above figure, we have a Message interface and a ValidationReport interface. This validation report is then used by a BankingValidationService, which represents some service that will run the validation rules and will act ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required