Pre-requisite - The Decision Table Software
Just in case you are not currently using Visual Paradigm, you may download in the Visual Paradigm download page. It comes with 30 days free evaluation period. You don't need any license key or activation code. Just download it, install it (or unzip it if you are going to download the No-Install version), run it and set the edition. Remember to select the Enterprise Edition as it is the edition that supports decision table.
Develop a Decision Table
In this section we are going to develop a decision table that represents the following business rules implemented by an online bookstore.
Now, take the steps below to develop a decision table.
- Start Visual Paradigm.
- To create a decision table, select Diagram > New from the toolbar.
- In the New Diagram window, select Decision Table and click Next.
- Keep Blank in the template selection screen and click Next.
Let's consider this rule: New customer has to pay in advance.
Obviously, "New customer" is a condition and "Accept pay in advance" is an action. Let's put them into the decision table. Initially a dummy condition and action are created for you. Let's rename them into New customer and Accept "Pay in advance" respectively.
- Double click on the cell next to the condition New customer, under the first rule. Select Y. Double click on the cell next to the action Accept "Pay in advance", under the first rule. Select X.
Here is another rule we have: If the amount of transactions a customer made in the previous month was more than $1,000, but the amount of transaction is less than $500 this time, allow the customer to pay in advance and pay upon delivery.
Add a new condition first. You can create a condition by moving your mouse pointer to the Conditions row and clicking the add button.
- Name the condition Previous monthly transaction > $1,000.
- Add one more condition - Transaction > $500.
- Similarly, create an action Accept "Pay upon delivery".
- Add a rule by clicking on the third button the editor toolbar.
- Select Y for the condition Previous monthly transaction >$1,000, N for Transaction > $500.
- Select X for the actions Accept "Pay in advance" and Accept "Pay upon delivery".
- Create the other rules. Your decision table should look like this:
Decision table that can answer your question
One of the strengths of decision table is that it allows people to view business logic from different angles, thus providing answers to different kinds of questions related to decision making. By viewing a decision table, you can easily tell with what conditions certain action would be performed, what will happen when certain condition is met, in what extent certain condition may affect the decision making process, etc. Although you can find the answers of all these question by naked eye, Visual Paradigm makes it even simpler by providing you with the highlighting feature. Just click on a condition (row), the business rules that cover the condition will be highlighted. The same technique can be applied on actions and rules, too.