Sitemap
DecisionRules

We offer an agile rule engine to let you create, edit and deploy business rules, while all rules run in a secure and scalable cloud. Unlike other rule engines, you can create your first rule in 5 minutes and make 100k decisions in a minute via API.

Decision Trees 🌲, the game-changer way of rule definition

5 min readDec 3, 2022

--

The Decision Trees is the fourth way of rule definition method in the DecisionRules, that leverages the ā€œgameā€ to a different level.

Press enter or click to view image in full size
Photo by: niko photos on Unsplash (edited)

DecisionRules is an intuitive, user-friendly and lightning-fast rule engine that focuses on the market needs and listens to its users. These are the reasons why we decided to implement a different way of how to create rules and get them evaluated at the branch level.

What is a Decision Tree?

ā€œA decision tree is a very specific type of probability tree that enables you to make a decision about some kind of process. In decision analysis, a decision tree can be used to visually and explicitly represent decisions and decision making. As the name goes, it uses a tree-like model of decisionsā€ — this is one of many definitions of the decision trees.

We, at DecisioRules approached the Decision Trees from a different perspective to enable all the users, either technical or business to create their tree structures without a previous experience with trees as such. The approach we chose is based on IF, THEN, ELSE statements in a combination with conditions. The Decision Trees are currently in the BETA version, meaning it works, but extensions will some soon šŸ˜‰

Press enter or click to view image in full size

Create your first Decision Tree

The creation of the Decision Trees starts with an Input and output definition same as at the Tables, Scripts or Flows.

Press enter or click to view image in full size
Input and Output models of the Decision Trees

Once you have successfully done with the meta-data, it is time to jump into the Decision Tree Designer (second tab on the upper part of the screen). Here the fun part comes!

Get DecisionRules.io’s stories inĀ yourĀ inbox

Join Medium for free to get updates fromĀ thisĀ writer.

Every rule starts with the IF statement (block) where you define the condition you want to set, in our case the condition will be package.weight where we will set the value between 0 and 9. On the other side of the block, you can add multiple conditions to create branches, but we chose a THEN statement, which determines what will be the output (result) when the IF condition is matching the input. The results are price, currency and deliveryInHours.

Press enter or click to view image in full size
Simple block in the Decision Tables with IF and THEN condition

To make it a little more complex we are adding one more IF condition with the OR statement embedded. It means either one of the conditions in the OR statement is matching the input, the THEN (output) clause will be the result shown in the test bench or as an output of the API call.

Press enter or click to view image in full size
IF block with OR condition

Not to forget, the most important block ELSE statement. What does it stand for? The ELSE statement is the one, which is the ā€œdefaultā€ result if none of the other conditions are matching the input/not evaluated as the passing ones. Never forget the ELSE statement in your trees!

Press enter or click to view image in full size
The ELSE statement with an embedded THEN

Now you are ready to execute the tree you have created. When running the Decision Tree it is evaluated in the way from the left to the right, the difference between the normal trees and the trees in the DecisionRules is the layout. We have the trees in the horizontal landscape, not vertical. To find out more about the principles and the fundamentals of the decision trees I recommend you to read this great article Decision Trees Explained.

The process of creating the trees and the features which DecisionRules allows you while working with the trees. A more detailed guide can be found in our extensive documentation. Let us know your feedback on what you like and what is missing for you.

Press enter or click to view image in full size
Preview of the Decision Trees in action

Other Releases

From the second half of the first quarter till the half of the second in 2022 we have worked on the Decision Trees which was a HUGE goal for the DecisionRules team. Even though, we had a clear focus on the trees we have managed to add a couple of other features as well:

  • Application redesign — the users can easier access the rules from the same window, the colors of the application were changed to ā€œmildā€ colors, the important sections were highlighted for more intuitive use and much more
Press enter or click to view image in full size
Quick access to all the rules in the space
  • Using a Microsoft account to log in — from now on, not only a Google account, custom SSO, but also a Microsoft account can be used to sign up or log in to the DecisionRules
  • Business-friendly testbench — the inputs can be inputted in a user-friendly table view without editing a JSON code, the same applies to the output
Press enter or click to view image in full size
Improved business-friendly test bench
  • Rules sorting according to various attributes — sort your rule in the list of rules according to the name rule name or last updated

DecisionRules offers a free of charge 30-days trial period, do not miss this opportunity!

Thank you for reading šŸš€
DecisionRules.io team

--

--

DecisionRules.io

Written by DecisionRules.io

Business rules engine where IT & business teams collaborate on decision automation. No-code. Fast deployment. Enterprise-ready. https://decisionrules.io/

DecisionRules

Published in DecisionRules

We offer an agile rule engine to let you create, edit and deploy business rules, while all rules run in a secure and scalable cloud. Unlike other rule engines, you can create your first rule in 5 minutes and make 100k decisions in a minute via API.