Decision Model and Notation is a novel approach to business rules and the relationships between rule sets (i.e., Decision table, tree, etc.). However, making a reusable DRD (Decision Requirement Diagram) in Decision Model and Notation (DMN) is very interesting. In DMN, the idea is that users model a Decision Requirement Diagram (DRD) and then share it across many business processes and applications as a single source of truth via a decision service.
So far, in DMN the shareable components between DRDs are decisions (i.e., decision nodes) as well as other nodes (i.e., business knowledge and knowledge source). This is very restrictive, as you cannot share an entire hierarchy of connected decisions (and other nodes). So, what if a DRD (or part of it) needs to be shared across multiple DRDs? After all, in concept and principal this requirement is very similar to Flow and Sub-Flow in BPM. As such, we implemented and called them Sub DRDs.
Let’s consider the DRD below, which is designed to calculate the insurance premium for a car.
Car Premium has two components: Auto Premium and Base Premium. Without the red highlight, it would not be easy to get the top decision. The reason for this is that the Auto Premium decision has been modeled in this single DRD.
Auto Premium Component
Let’s extract the red piece into another DRD model such as the one shown below:
Now this looks exactly like any other DRD with one root decision called “Auto Premium”. In other words, nothing special.
New Premium Model
In the main model, we replace the red highlight with only one Sub DRD node:
This new final model is now much simpler and cleaner to understand, as well as being easier to maintain. What is important now are the characteristics and behaviours of this Sub DRD node in the model.
We have to look at this new node (Sub DRD) in two ways:
1. The node behaviour itself
2. Its connections in relation to other nodes in the model
Remember, this is just a place holder for the other extracted DRD that models the whole Auto Premium component of the decision. In its behaviour, this new node (Sub-DRD) is very similar to a Decision node in the standard DMN. There is only one difference – it can be linked only to a DRD, and not to other types of implementation (e.g., decision tables, etc.).
Also, its connection properties are identical to a Decision node, so it follows the same rules.
Here are the benefit of this approach:
1. Cleaner models: it makes the main model simpler to understand
2. Reusable DRD: It makes for a more reusable DRD across other processes as well as other DMN models (i.e., DRD)
3. Better Quality: It makes testing of models simpler, as each Sub DRD can be tested individually.