Practical Use and Advantages of Natural Language in Modeling Business Rules in DMN

Modeling business rules using natural language offers business users great flexibility and adaptability to write business rules by defining their own ubiquitous language using business glossaries, terms, and fact concepts to guide you with predictive typing capability. It is even more useful when users can model business rules in natural language in DMN (Decision Model and Notation), an industry standard for decision modeling that supports decision management and business rules. In this post, you will discover how DMN supports business rules written in natural language and helps different groups of a project to work collaboratively maintaining interchangeability.

How to Model Business Rules Using Natural Language in a Real Scenario

We can use Decision Requirement Diagrams (DRD) to map the decisions including the business rules modeled in natural language made in DMN. Let’s see the behavior of DRD using an example of a flight rescheduling scenario.

There will be two lists as the input for this scenario:

  • Flights
  • Passengers

These are the main decisions we will be making when reassigning the flights for the passengers who got the flights canceled:

  • Determine passenger queue
  • Reassign the passengers

Furthermore, as business knowledge, we will also filter out:

  • Canceled Flights

In this example of flight scheduling, we have used a FlexRule® Advanced Decision Management suite to model decisions as follows. It simply contains a DRD, a natural language document containing modeled business rules, and a boxed expression document.

The DRD shows the decisions, inputs, and business knowledge we require. In this diagram,

  • The inputs are flights and passengers,
  • Finding the canceled flights is business knowledge and finding the passengers with canceled flights and reassigning them are the decisions.

DRD

For the following nodes in the DRD, we have used a boxed expression document.

  1. Canceled Flights
  2. Determine Passenger Queue

It allows defining expression and literal values we will be using thought the project. Therefore, we can simply use the alias of an expression instead of the complete expression repeatedly.

Decision table

Then we have used Natural Language for the procedural logic in the scenario which is represented by the node “Reassign Passengers”.

You can see that we have created separate functions for each step under the main function, Reassign Next Passenger. This helps to clearly understand the steps we took factoring business rules when making the decision of reassigning the passengers.

Natural language business rules

Furthermore, FlexRule supports monad operators to chain multiple expressions providing a list of built-in functions available to be used in expressions. For this project, we have used a few of them such as filter, orderBy, and count.

Book a Custom Demo

First or last name is too short





Business Rules in Natural Language is Beneficial

Modeling business rules using natural language transforms complex or unclear statements in business logic into business-friendly, meaningful expressions – this is the key benefit for business users to adapt much faster. Also, it can be easily integrated as part of the decisions using DRD in DMN that is reusable. Being able to decompose the components of a decision into sub-decisions, business knowledge, input data, and knowledge sources makes it easier to understand the decisions you make and justify each step. Since the decision hierarchy is very transparent, making the changes is simpler and less risky. You can clearly identify which step can be improved, which step gives inaccurate results, or which step is redundant making it easier to maintain and improve.

Last updated September 21st, 2023 at 01:22 pm, Published November 5th, 2021 at 01:22 pm