Business Rules 101: appRules Decision Tables for Beginners

In this Business Rules 101 post, we will take a very quick look at Decision Tables in appRules.  Decision Tables are an important part of any business rules engine.  And they play an important role in appRules business rules projects.  At a future date, we will do a Deep Dive post on appRules Decision Tables.

If you have not checked out our earlier Business Rules 101 post on Configuring Actions and Conditions, you should do so before continuing.  The Actions and Conditions post can be found at: https://blog.appstrategy.com/2016/06/24/business-rules-101-configuring-actions-and-conditions-in-apprules/

Once you understand the basics of appRules Actions and Conditions and how to configure them, you’re ready to start composing business rules projects that contain decision tables.

But first; What is a Decision Table?

For now, Wikipedia will do:

Decision tables are a precise yet compact way to model complex rule sets and their corresponding actions.

Decision tables, like flowchartsif-then-else, and switch-case statements, associate conditions with actions to perform, but in many cases do so in a more elegant way.

 

Let’s get started!

From the appRules Business Rules module, drag the EvaluateDecisionTable activity on to the designer.

The blank Decision Table Editor window will be displayed:

To configure the decision table, right mouse click on the table to display the context menu.  It is through the context menu that you perform all actions on the decision table.  And, the appRules Decision Table context menu is really a context menu in every sense of the word.  The number and type of entries on the menu changes depending on where you clicked on the table.  Follow the on-screen instructions to configure the table entries.

Below is a view of the decision table context menu:

As noted earlier, the entries visible on the context menu depend on where you clicked on the table.  We will cover some of the key menu items when we do the Deep Dive post on appRules Decision Tables.

 

Note: When adding Decision Table Actions and Conditions, the method is the same as when adding Actions and Conditions directly from the Toolbox.

 

Below is a sample decision table containing conditions and actions for applying discounts to customer orders:

At any time, you can validate and do a test run of the decision table.  appRules prompts for test values and displays the result.  Decision tables can be combined with other business rules and data integration activities to compose very powerful solutions.

 

Conclusion

The appRules business rules and integration engine fully supports the development of powerful projects without using decision tables.  But for complex decision making solutions, the addition of appRules Decision Tables adds precise yet compact way to model complex rule sets and their corresponding actions.  And it is done mostly without writing code.

 

You can download appRules with sample business rules projects at: http://www.appstrategy.com/appRulesTrial

Author: appStrategy Team

appStrategy Support Team blog