Decision Model and Notation (DMN) Tutorial
Blog: ProcessMaker Blog
Behind the scenes of any business process management workflow is a web of complex decision-making. Data whizzes through a decision tree, turning left at some waypoints and right at others to arrive at an ultimate conclusion. To the untrained eye, the code that routes data through a process reads like a foreign language, hampering communication between computer science whizzes and front-office team members. At the intersection of these two diverse groups is Decision Model and Notation (DMN).
What is Decision Model and Notation?
DMN is one of three complementary standards introduced by the Object Management Group (OMG), a global consortium dedicated to standardizing the languages behind different process management systems. Serving as a translator of sorts, DMN converts the code behind complex decision-making into easily readable diagrams. DMN enables everyone from C-Suite executives to technical developers to visualize the decision trees powering every workflow.
Organizations can use DMN to illustrate the logic behind many processes you’re likely familiar with:
Pricing calculators: DMN helps visualize the many conditions systems assess to produce an airfare or rental car rate.
- A traveler is browsing for tickets to Des Moines, Iowa.
- It is the week of Thanksgiving. Business rules state prices are higher during this timeframe, as are flights to the Midwest.
- The pricing platform displays a final price based on destination and time of year.
Product recommendations: DMN helps an internal team devise how their systems determine what holiday gifts or weekend movies a platform suggests to a given user.
- A viewer is browsing movies on a Friday night.
- Their customer profile indicates they usually watch comedies.
- It is November, so holiday movies are now available.
- The system recommends the latest holiday comedies.
Loan applications: Banks and credit unions can use DMN to pinpoint the Know-Your-Customer checks an application must move through before approval.
- A customer submits a loan application through a self-service portal.
- An automation routes the application through a background check system.
- The customer is red-flagged within the verification system.
- The system denies the application.
Vacation time: Calculate how much time off employees aggregate over the year.
- An employee has worked with the company for five years.
- The company awards three vacation days each year.
- The employee has earned 15 days of vacation.
DMN serves as a very user-friendly way to communicate IFTTT (if this, then that) business rules that govern both internal and customer-facing processes.
How does DMN complement BPMN and CMMN?
DMN is one of three important languages for business process modeling. Working alongside Business Process Modeling Notation (BPMN) and Case Management Model and Notation (CMMN), organizations have access to a full library of languages to help citizen developers and IT professionals collaborate on workflows and automations.
Business Process Modeling Notation
Business Process Modeling Notation (BPMN) illustrates the grand scheme of a predictable, repeatable process. BPMN Diagrams pinpoint the start and end of a workflow, as well as show the sequence of events that take place throughout.
Simple example: An event planner uses BPMN to layout the tasks involved in planning an upcoming party. Twelve weeks before the event, an automated system collects RSVPs, creates a seating chart, and polls attendees on their food preference.
Case Management Model and Notation
Not every process is predictable where a decision can be made following a set of concrete, fixed steps. In fact, there are many circumstances where an automated process requires human intervention to make a decision. Enter Case Management: a technique used to manage a state that diverges from the norm. Case Management Model and Notation helps teams model these fringe processes to integrate steps performed by an intervening knowledge worker.
Simple example: A party guest selects “Other” from the food preference survey and indicates an obscure food allergy. The system flags this response, and automatically alerts the party planner to further investigate the allergy and order a specialty dish for this fringe case.
Decision Model and Notation
DMN zooms in on the detailed logic behind each step.
Simple example: While an activity in a BPMN Diagram might read “Create Seating Chart,” DMN provides the granular logic powering this step. DMN pinpoints the detailed inputs like relationship compatibility and age of attendee to decide at where each guest will sit.
How to model a simple decision using DMN
A diagram used to map DMN is known as Decision Requirements Diagram. This model easily illustrates a complex network of decision waypoints that support an ultimate conclusion.
Let’s explore a simple DRD using the example of an ecommerce platform called Snow Shoppe selling popular holiday gifts. The holiday season is rife with promotions, deals, and customer rewards. While a popular item might be $99.99 for the majority of the calendar, there are lots of conditions surrounding this special time of year that ultimately impact an item’s price.
Let’s envision Snow Shoppe is setting Snow Globe prices based on a customer’s reward tier.
Instead of an individual worker manually tabulating the final price, these rules exist in a decision table. While code ultimately performs the calculating, front-office employees like sales or marketing can easily visualize how pricing is determined.
|Member Rewards Tier||Snow Globe Price|
This chart uses the three elementary elements of a DRD:
- Input Data: The information that your logic analyzes in order to produce a decision.
- Output / Decision: The ultimate decision produced by your set of logic inputs.
- Business Knowledge Model (BKM): The system knows the store’s policy. Each rewards tier subtracts another $10.00 off of the price.
Before displaying a price, the system assesses whether the account holder is a rewards member. If the shopper is a top-level Gold Member, the system subtracts $20.00 for a final price of $79.99. If the member is shopping as a guest, they will pay the standard list price of $99.99.
The holiday season is a big time of year for many businesses. Even with an advanced plan, marketing and sales teams might come up with fresh promotions that need rapid implementation. With a few changes to the visual model, they can easily communicate this necessary update with IT.
Perhaps Marketing wants to launch an additional promotion plan unlocked by a given rewards tier. You can create a series of dependent logic so one decision’s output fuels the input for the next. For instance, perhaps Gold Members get an additional discount on Black Friday. Once the system determines a shopper’s membership level, it will then use that information to determine whether time-sensitive Black Friday pricing is relevant to that rewards tier.
|Member Rewards Tier||It’s Black Friday||Snow Globe Price|
How to use FEEL in your DMN
Friendly Enough Expression Language, known as FEEL, helps express a variety of conditions for assessing data. In the chart above, you can use TRUE or FALSE to determine whether it is Black Friday, but FEEL has a variety of uses for calculating price within this DMN:
- The number of days before a big holiday is greater than a certain number.
- The customer has purchased a total dollar amount over the course of the year.
- A personalized date, like the celebration of the customer’s birthday.
- The number of Snow Globes that are in the customer’s cart.
FEEL helps citizen developers and IT professionals drill down on the nuances of very unique conditions within a DMN.
Decision Model and Notation is a powerful tool for establishing the granular logic at the foundation of your organization’s business rules. While complex code can mire dialog between business users and advanced technical experts, DMN bridges the gap to encourage crystal clear communication between departments.