# Decision Model and Notation

In business analysis, the Decision Model and Notation (DMN) is a standard published by the Object Management Group. It is a standard approach for describing and modeling repeatable decisions within organizations to ensure that decision models are interchangeable across organizations.
The DMN standard provides the industry with a modeling notation for decisions that will support decision management and business rules. The notation is designed to be readable by business and IT users alike. This enables various groups to effectively collaborate in defining a decision model:
* the business people who manage and monitor the decisions,
* the business analysts or functional analysts who document the initial decision requirements and specify the detailed decision models and decision logic,
* the technical developers responsible for the automation of systems that make the decisions.
The DMN standard can be effectively used standalone but it is also complementary to the BPMN and CMMN standards. BPMN defines a special kind of activity, the Business Rule Task, which "provides a mechanism for the process to provide input to a business rule engine and to get the output of calculations that the business rule engine might provide" that can be used to show where in a BPMN process a decision defined using DMN should be used.
DMN has been made a standard for Business Analysis according to BABOK v3.

## Elements of the standard

The standard includes three main elements
* Decision Requirements Diagrams that show how the elements of decision-making are linked into a dependency network.
* Decision tables to represent how each decision in such a network can be made.
* Business context for decisions such as the roles of organizations or the impact on performance metrics.
* A Friendly Enough Expression Language (FEEL) that can be used to evaluate expressions in a decision table and other logic formats.

## Use cases

The standard identifies three main use cases for DMN
* Defining manual decision making
* Specifying the requirements for automated decision-making
* Representing a complete, executable model of decision-making

## Benefits

Using the DMN standard will improve business analysis and business process management, since
* other popular requirement management techniques such as BPMN and UML do not handle decision making
* growth of projects using business rule management systems or BRMS, which allow faster changes
* it facilitates better communications between business, IT and analytic roles in a company
* it provides an effective requirements modeling approach for Predictive Analytics projects and fulfills the need for "business understanding" in methodologies for advanced analytics such as CRISP-DM
* it provides a standard notation for decision tables, the most common style of business rules in a BRMS

## Relationship to BPMN

DMN has been designed to work with BPMN. Business process models can be simplified by moving process logic into decision services. DMN is a separate domain within the OMG that provides an explicit way to connect to processes in BPMN. Decisions in DMN can be explicitly linked to processes and tasks that use the decisions. This integration of DMN and BPMN has been studied extensively. DMN expects that the logic of a decision will be deployed as a stateless, side-effect free Decision Service. Such a service can be invoked from a business process and the data in the process can be mapped to the inputs and outputs of the decision service.

## DMN BPMN example

As mentioned, BPMN is a related OMG Standard for process modeling. DMN complements BPMN, providing a separation of concerns between the decision and the process. The example here describes a BPMN process and DMN DRD (Decision Requirements Diagram) for onboarding a bank customer. Several decisions are modeled and these decisions will direct the processes response.

### New bank account process

In the BPMN process model shown in the figure, a customer makes a request to open a new bank account. The account application provides the account representative with all the information needed to create an account and provide the requested services. This includes the name, address and various forms of identification. In the next steps of the work flow, the 'Know Your Customer' (KYC) services are called. In the 'KYC' services, the name and address are validated; followed by a check against the international criminal database (Interpol) and the database of persons that are 'Politically exposed persons (PEP)'. The PEP is a person who is either entrusted with a prominent political position or a close relative thereof. Deposits from persons on the PEP list are potentially corrupt. This is shown as two services on the process model. Anti-money-laundering (AML) regulations require these checks before the customer account is certified.
The results of these services plus the forms of identification are sent to the Certify New Account decision. This is shown as a 'rule' activity, verify account, on the process diagram. If the new customer passes certification, then the account is classified into onboarding for Business Retail, Retail, Wealth Management and High Value Business. Otherwise the customer application is declined. The Classify New Customer Decision classifies the customer. If the verify-account process returns a result of 'Manual' then the PEP or the Interpol check returned a close match. The account representative must visually inspect the name and the application to determine if the match is valid and accept or decline the application.

### Certify new account decision

An account is certified for opening if the individual's' address is verified, and if valid identification is provided, and if the applicant is not on a list of criminals or politically exposed persons. These are shown as sub-decisions below the 'certify new account' decision. The account verification services provides a 100% match of the applicants address. For identification to be valid, the customer must provide a driver's license, passport or government issued ID.
The checks against PEP and Interpol are 'Fuzzy' matches and return matching score values. Scores above 85 are considered a 'match' and scores between 65 and 85 would require a 'manual' screening process. People who match either of these lists are rejected by the account application process. If there is a partial match with a score between 65 and 85, against the Interpol or PEP list then the certification is set to manual and an account representative performs a manual verification of the applicant's data. These rules are reflected in the figure below, which presents the decision table for whether to pass the provided name for the lists checks.

### Client category

The client's on-boarding process is driven by what category they fall in. The category is decided by the:
* Type of client, business or private
* The size of the funds on deposit
* And the estimated net worth
This decision is shown below:
There are 6 business rules that determine the client's category and these are shown in the decision table here:

### Summary example

In this example, the outcome of the 'Verify Account' decision directed the responses of the new account process. The same is true for the 'Classify Customer' decision. By adding or changing the business rules in the tables, one can easily change the criteria for these decisions and control the process differently.
Modeling is a critical aspect of improving an existing process or business challenge. Modeling is generally done by a team of business analysts, IT personnel, and modeling experts. The expressive modeling capabilities of BPMN allows business analyst to understand the functions of the activities of the process. Now with the addition of DMN, business analysts can construct an understandable model of complex decisions. Combining BPMN and DMN yields a very powerful combination of models that work synergistically to simplify processes.

## Relationship to decision mining and process mining

Automated discovery techniques that infer decision models from process execution data have been proposed as well. Here, a DMN decision model is derived from a data-enriched event log, along with the process that uses the decisions. In doing so, decision mining complements process mining with traditional data mining approaches.

## cDMN extension

Constraint Decision Model and Notation (cDMN) is a formal notation for expressing knowledge in a tabular, intuitive format. It extends DMN with constraint reasoning and related concepts while aiming to retain the user-friendliness of the original. cDMN is also meant to express other problems besides business modeling, such as complex component design.
It extends DMN in four ways:
* Constraint modelling (see Constraint programming)
* Adding expressive data representation, such as typed predicates and functions (similar to First-order logic)
* Data tables, in which each entry represents a different problem instance
* Quantification
Due to these additions, cDMN models can express more complex problems. Furthermore, they can also express some DMN models in more compact, less-convoluted ways. Unlike DMN, cDMN is not deterministic, in the sense that a set of input values could have multiple different solutions. Indeed, where a DMN model always defines a single solution, a cDMN model defines a solution space.
Usage of cDMN models can also be integrated in Business Process Model and Notation process models, just like DMN.

### Example

As an example, consider the well-known map coloring or Graph coloring problem. Here, we wish to color a map in such a way that no bordering countries share the same color. The constraint table shown in the figure (as denoted by its E* hit policy in the top-left corner) expresses this logic. It is read as "For each country c1, country c2 holds that if they are different countries which border, then the color of c1 is not the color of c2.
Here, the first two columns introduce two quantifiers, both of type country, which serve as universal quantifier. In the third column, the 2-ary predicate borders is used to express when two countries have a shared border. Finally, the last column uses the 1-ary function color of, which maps each country on a color.