Decision Tables, Part 1 ~ The Route to Consolidated Business Logic

Ronald G.  Ross
Ronald G. Ross Co-Founder & Principal, Business Rule Solutions, LLC , Executive Editor, Business Rules Journal and Co-Chair, Building Business Capability (BBC) Read Author Bio       || Read All Articles by Ronald G. Ross

As you scale up, effective means to visualize and manage entire sets of rules at a time becomes more and more important.  Decision tables are excellent in that regard.  In general, decision tables can be used where these three criteria are met:

  1. A significant number of rules are parallel -- that is, they share the same subject, have exactly the same evaluation term(s), and are equivalent (but not identical) in effect.  In other words, the rules all share a common pattern and purpose.

  2. Each evaluation term has a finite number of relevant instances or ranges of values (a.k.a. brackets).

  3. Given the different instances or brackets of the evaluation term(s), the outcomes cannot be predicted by a single formula.  (If a single formula could predict the outcomes, using a single rule or set of rules to give the unified formula is a better approach.)

Here is a simple example.

Rule 1:  Applicable sales tax is to be 6.0% if year = 1999.

Rule 2:  Applicable sales tax is to be 6.5% if year = 2000.

Rule 3:  Applicable sales tax is to be 6.5% if year = 2001.

Rule 4:  Applicable sales tax is to be 6.5% if year = 2002.

Rule 5:  Applicable sales tax is to be 6.25% if year = 2003.

Rule 6:  Applicable sales tax is to be 7.0% if year = 2004.

Rule 7:  Applicable sales tax is to be 8.0% if year = 2005.

Rule 8:  Applicable sales tax is to be 8.15% if year = 2006.

Note that this set of rules satisfies all three criteria above:

  1. The eight rules are exactly parallel.  They share the same subject, applicable sales tax; have exactly the same evaluation term, year; and are equivalent (but not identical) in effect, an indicated sales tax percentage for each given year.

  2. The evaluation term, year, has a finite number of relevant instances (eight).

  3. The outcomes, the percentages indicated for applicable sales tax, cannot be predicted by a formula.  Note that the sales tax rate decreased in 2003 from the previous year -- an apparently infrequent (and perhaps improbable!) tax cut.

The following rule along with Decision Table A shows the consolidated business logic for the eight rules given above.  I think you'll agree it's quite an improvement!

Rule:  Applicable sales tax is to be the percent value in Decision Table A for a given year.

Decision Table A

Year

Applicable
Sales Tax

1999

6.0

2000

6.5

2001

6.5

2002

6.5

2003

6.25

2004

7.0

2005

8.0

2006

8.15

The decision table above has only a single evaluation term.  Most decision tables have more than that.  To illustrate, the following rule along with Decision Table B adds a second evaluation term, county, to determine applicable sales tax.

Rule:  Applicable sales tax is to be the percentage in Decision Table B for a given year and county.

Decision Table B

YEAR

County

Harkin

Lopes

Qwan

Quail

1999

6.95

8.2

7.35

4.0

2000

6.73

8.3

9.0

4.5

2001

6.15

8.4

9.0

5.0

2002

6.15

8.3

9.0

5.5

2003

6.15

8.4

6.75

6.0

2004

6.15

8.2

6.75

6.75

2005

5.75

8.2

6.75

7.0

2006

5.95

8.4

7.5

7.25

What about representing more than two evaluation terms using a decision table?  That's problematic using a two-dimensional media (for example, paper) unless most of the evaluation terms are simple.  (An example of simple would be is order overdue, which can be answered by only yes or no.)  If the simple test is satisfied, the business logic can still be represented in variations of the two-dimensional format, for example:

  • Splitting rows and/or columns within a single array.

  • Multiple arrays, with one array per relevant instance or bracket of one (or more) of the evaluation terms.

Beyond that some different approach is required.  At this point (if not before!) an automated support tool becomes just about indispensable.  The following rule along with Decision Table C illustrates.

Rule:  The delivery method for an order is to be as in Decision Table C.

Decision Table C 

Decision Criteria

Delivery Method for an Order

Picked Up by Customer

Shipped by Normal Service

Shipped by Premium Service

Rush order

No

Yes

Yes

Order includes fragile item

No

Yes

--

Order includes specialty item

No

No

--

Order includes high-priced item

No

No

--

Order includes item involving hazardous materials

No

Yes

Yes

Category of customer

Silver

Gold

Platinum

Destination of order

--

Local

Remote

Decision Table C establishes the basis for determining the delivery method for an order.  Three possible delivery methods (the outcomes) are indicated along the top.  Seven decision criteria appear at left as labels for the rows.  (This table therefore involves seven dimensions.)  Six of these decision criteria are binary (yes, no or local, remote), whereas one, category of customer, involves three possibilities (silver, gold, platinum).  The choice of delivery method for an order depends on what appears in the cells of a column.  A dash (--) in a cell indicates that the associated decision criteria does not matter in determining the outcome; that is, any alternative for that decision criteria will produce the same outcome.

Such multi-dimension decision tables must be developed with care and then scrutinized closely because they are prone to anomalies and other problems.  For example, consider the issue of completeness.  How complete is the sample decision table above?  Not very!  Can you tell why?  The answer in next month's column....

# # #

Standard citation for this article:


citations icon
Ronald G. Ross, "Decision Tables, Part 1 ~ The Route to Consolidated Business Logic" Business Rules Journal, Vol. 6, No. 7, (Jul. 2005)
URL: http://www.brcommunity.com/a2005/b240.html

About our Contributor:


Ronald  G. Ross
Ronald G. Ross Co-Founder & Principal, Business Rule Solutions, LLC , Executive Editor, Business Rules Journal and Co-Chair, Building Business Capability (BBC)

Ronald G. Ross is Principal and Co-Founder of Business Rule Solutions, LLC, where he actively develops and applies the BRS Methodology including RuleSpeak®, DecisionSpeak and TableSpeak.

Ron is recognized internationally as the "father of business rules." He is the author of ten professional books including the groundbreaking first book on business rules The Business Rule Book in 1994. His newest are:


Ron serves as Executive Editor of BRCommunity.com and its flagship publication, Business Rules Journal. He is a sought-after speaker at conferences world-wide. More than 50,000 people have heard him speak; many more have attended his seminars and read his books.

Ron has served as Chair of the annual International Business Rules & Decisions Forum conference since 1997, now part of the Building Business Capability (BBC) conference where he serves as Co-Chair. He was a charter member of the Business Rules Group (BRG) in the 1980s, and an editor of its Business Motivation Model (BMM) standard and the Business Rules Manifesto. He is active in OMG standards development, with core involvement in SBVR.

Ron holds a BA from Rice University and an MS in information science from Illinois Institute of Technology. Find Ron's blog on http://www.brsolutions.com/category/blog/. For more information about Ron visit www.RonRoss.info. Tweets: @Ronald_G_Ross

Read All Articles by Ronald G. Ross
Subscribe to the eBRJ Newsletter
In The Spotlight
 Ronald G. Ross
 John A. Zachman
';
The Issue Is THE ENTERPRISE By John A. Zachman Jan. 2017 | Vol. 18, Iss. 1

Online Interactive Training Series

In response to a great many requests, Business Rule Solutions now offers at-a-distance learning options. No travel, no backlogs, no hassles. Same great instructors, but with schedules, content and pricing designed to meet the special needs of busy professionals.