SOA composite applications contain various forms of logic. These have some overlap, but they also have their own specific actors, implementation technologies, and maintenance cycles. There is, of course, implementation logic written by programmers in programming languages such as BPEL, XPath and XSLT, Java, and even PL/SQL. There is also process logic, designed perhaps using the Business Process Analysis Suite, modeled in BPMN or BPEL by business analysts.
Another type of logic is business logic—describing and implementing derivations, validations, calculations, and other business rules. Frequently this last type of logic is described by the analysts—in free format text—and then implemented by developers as part of the programs they write. It is fairly common to find the implementation of business logic done in several places in the application using hard-coded values and references. The business logic cannot easily be told apart from the implementation logic of the computer program, cannot be modified without the help of the programmers, and cannot be deployed without redeploying the entire application. This is a problem since business logic –especially business rules- tend to change in a faster pace than other logic.
This chapter introduces the Decision Service component in SOA Suite, also known as the Business Rule service component. We will see in this chapter how business rules can be implemented and integrated in composite applications or exposed as elementary services. In part 5, when we discuss [business] processes, we will discuss the Business Rule component again – to encapsulate the decision logic required to steer the process flow.
Parts in this chapter:
- Introduction of Business Rule – Calculating the Airport Charge for a Flight – round one
- Decision Table for extended calculation of Airport Charge
The final application created in this chapter is fairly simple: it calculates the airport charge for a certain flight, using a Business Rule component in which all calculation logic is encapsulated.
This picture shows a real world airport charge calculation table:
which is pretty much resembled by the decision table created in this chapter:
Sources for this chapter can be found on Github: Chapter 11 sources.