Oracle SOA, Java And Software Development Reflections: Oracle Business Rules 11g

Oracle Business Rules is a lightweight and powerful rules engine that is part of the Oracle SOA Suite. While Oracle will a pretty good job on documenting the decision desk features – Dealing with Decision Tables – there is a lot less information available about how to really design your choice tables. In this article, I wish to share my experience with the decision tables and explain what I consider the guidelines in using them.

I am getting excited about your feedback in the comments section. The most important and first question you ought to be asking yourself before you create a choice table is, “is the decision desk the right vehicle for this working job?”. Sometimes this can be a no-brainer – like whenever your customer gives you a spreadsheet that neatly translates into a choice table. Other times the choice might not be that obvious. Let’s check out an example.

It is questionable though whether a choice table is a good fit here. While it is appealing thanks to its visually comprehensive design still, a remedy with IF/THEN guidelines is likely to be simpler and cleaner, if the amount of rules increases in the future especially. All employees in the Sales department have entitlement to a company car. Employees in the Executive department have entitlement to a company car if their job level is intermediate or expert.

  • The Better Angels of Our Nature by Steven Pinker
  • Anticipate your future financial health based on your current financial status and background
  • Buy and Sell Websites
  • Simple Gantt Chart

Employees in the IT department are entitled to an organization car if their job title is Architect and their job level is expert. Despite the fact that this policy has the same variety of conditions as the first one, it produces much more concise and coherent decision table. The first plan uses disconnected conditions which do not mix very well into a decision table. The second plan has conditions shared by the majority of the rules which vary only by the problem input values. My advice is to consider the framework and size of your to-be-implemented rule set, then take a mental picture of your choice table solutions and compare it to the IF/THEN rule solution.

Only use a choice table if it gives you an advantage compared to an IF/THEN guideline solution. I mentioned above that you may get a spreadsheet from your customer that translates neatly into a decision table. The truth is though, it’s rarely that easy. More often than not, the standards shall contain a few stumbling blocks.

I once received a spreadsheet from the customer that contained two overlapping conditions which were supposed to yield opposite results. The good news is, if you accurately translate your specification into a choice desk, the logical imperfections in the specification will pop-up as conflicts or spaces. This way the implementation can in fact help enhance the specification – isn’t it amazing?

On top of that, the more your decision table resembles the standards, the easier it will be to implement any future standards changes. Make your decision table match your specification as closely as you can. When you take a look at either of the above decision tables, you will notice that they capture only the cases when the business car privilege is granted to the employee. I did it deliberately to keep the tables as easy as possible. In my experience the real world specification also tends to come that way – as an enumeration of cases when something happens or applies – rather than as a full list of all eventualities.

Yet it takes care of to consider all possible instances – and there’s a nifty tool built-in the Rules Designer that will exactly that – the Gap Analysis. The above picture shows the difference analysis for your choice table implementing the next company car policy. I love to see it as an inverse version of the original decision desk – as it is covering all the situations when the business car is not granted.