BPM6. Decision Modelling With DMN
BPM6. Decision Modelling With DMN
Decision Modelling
with DMN
3
1. Process modelling and decisions
4
What should be in a process model?
Exceptions?
Timers?
Happy path?
Decisions?
Decision logic?
Business rules?
Roles?
Messages?
Notifications?
Triggers?
Conditions?
…
5
What to model?
• Decisions are important for business, not only processes
• Why would we only model the processes?
• Where is the decision?
• How is the decision logic modelled?
• Model the decision activity: Decide acceptance
?
6
What to model?
• Processes contain decisions
• When to accept/refuse a claim? Depends on:
• Customer history
• Format requirements
• Timing constraints
• Type of contract
•…
?
7
Decisions come in many forms
• Strategic and tactical decisions
• Often high-level, long-term, big impact, infrequent,
unstructured Strategic decisions
• Do we enter the insurance market?
• Should we sell travel insurance?
• Operational decisions
Tactical decisions
• Daily, high-volume, often structured, standard • Which products will we promote?
8
Operational decisions
• Made frequently
• Non-trivial
• Made rapidly
• Made consistently
• High volume
• Measurable business impact
• Deterministic
• Frequent change (but compliant)
• Comprehensibility
• Automated or manual
9
Managing decisions
• What is the decision?
• eligibility, price, insurance, theft rating, customer offer, retention, supplier
selection, hire, credit, …
• Who, what, how?
• Who owns the decision?
• Who makes the decision every day?
• Who is impacted?
• What triggers the decision?
• When are we making this decision?
• What is required to make this decision?
• Information requirements
• Knowledge sources (regulations, analytics, expertise)
• Other decisions
• Decision logic
10
Decisions in processes
1. Inside a knowledge-intensive activity
• Manual or automated
11
Decisions in processes
2. Or as shown by a simple gateway
• Based on a single question (criterion) with
two or more outcomes
• Note: the gateway itself is not the decision
12
Decisions in processes
3. Or as shown by a cascade of gateways
• Based on multiple questions (criteria)
13
The wrong way
• Decision trees should not be process
paths
• Do not hardcode decision rules into the accept low risk
applicant
Medical Record)
14
Separate the business rule from the
process
15
Acknowledged in BPMN 2.0
New BPMN 2.0 Activity Types
determine process
applicant medium risk mediumrisk
ty pe applicant
16
Decisions need to be modelled
• Decision models are not
lower level details of one
process
• Decisions models can span
over multiple activities, and
even multiple processes
• Separation of concerns
17
Decision and Process Model
18
Decision and Process Model
19
The need for DMN
• Decision(s) (rules) need to be
modelled
• DMN decision models are meant to
be created by the business, not IT
• A standard for processes (BPMN) is
not enough
20
2. Decision Model and
Notation (DMN)
21
Decision Model and Notation
• The DMN (Decision Modeling & Notation) standard was produced by OMG (version 1.0 in
2014, version 1.3 in 2021): https://www.omg.org/dmn/
• DMN is a modeling language and (executable) notation for the precise specification of
business decisions and business rules
• DMN is easily readable by the different types of people involved in decision management
• business analysts who create initial decision requirements and detailed decision models
• businesspeople who specify the rules, and manage & monitor their application
• technical developers responsible for automating the decisions in processes
22
Decisions as a business concern
• More and more business operations are being automated
• Business has to react immediately, e.g. in online applications
• A human is often not involved anymore at the moment of
transaction
23
Decision automation
• DMN unifies modelling and execution
• DMN models can be (directly) automated using a Business
Rules Management System (BRMS)
• Decision service
• Encapsulation of the decision logic
• Provisioning of an interface
• When called with a set of input data, the decision service will evaluate
the specified decisions and return their results
24
Consistent and explainable decisions
• Automated systems and processes contain the logic of
decisions
• In automated decisions the decision logic should be:
• well-designed
• correct
• consistent
• explainable
• understandable by the business
• easy to change
• maintained by the business
25
DMN: Two modelling levels
• The Decision Requirements level
• What is required to make this decision?
• Information
• The outcome of other decisions
• Knowledge sources (regulations, analytics, expertise)
26
DMN in two pictures
1. Decision requirements 2. Decision logic
27
Decision tables
• Good decision table models are a proven technique to represent
decision rules
• Consistency, completeness and correctness by design
28
Example: Covid Safe Ticket
29
Major elements of DMN
• Decision Requirements Diagram (DRD)
• What do we need to make a decision: goal
oriented requirements
31
Why decision requirements modeling?
• The decision requirements level describes WHAT we need in order to
make a decision, not HOW to make it :
32
Decision requirements notation
• A decision depends on criteria, input data, decision rules,
etc. Notation Example
• The decision requirements diagram (DRD) models these Decision Discount
dependencies using only a few symbols
• A box represents a decision
• A rounded rectangle represents the required information to make
the decision. Decision Customer Type
33
When does a decision depend on another
decision?
• In a car rental company, a rental is offered or refused depending on
age eligibility, drop-off validity and availability of the requested
vehicle.
• A vehicle is available if the requested car group is available OfferOrRefuse
34
DMN basic components
• A decision is the act of determining an output value (the chosen option),
from a number of input values, using logic defining how the output is
determined from the inputs
• This decision logic may include one or more business knowledge models
which encapsulate business know-how in the form of business rules,
analytic models, or other formalisms
35
Knowledge sources
• Authorities may be defined for decisions or business knowledge models
• They might be (for example) domain experts responsible for defining or
maintaining the knowledge model, or source documents from which
business knowledge models are derived, or sets of test cases with which
the decisions must be consistent
• These are called knowledge sources
36
Decision Requirements Diagram
• A decision is said to “require” its inputs in order to
determine its output
• The inputs may be input data, or the outputs of
other decisions
• If the inputs of a decision Decision1 include the
output of another decision Decision2, Decision1
“requires” Decision2
• Decisions may therefore be connected in a network
called a Decision Requirements Graph (DRG), which
may be drawn as a Decision Requirements Diagram
(DRD)
37
Summary
38
Summary
39
Example of a DRD (1)
Information requirement
Knowledge requirement
Authority requirement
40
Example of a DRD (2)
41
What to do, or how to do it?
• What is to be decided? Possible outcomes?
• Decisions require:
• Input data
• Transactions
• Master data
• External data
• Decision logic
• Rules, knowledge
• Policies
• Analytics
• Outcome of other decisions
• Reusability
42
Advantages of decision requirements
modelling
• Why is it so important to separate the decision structure from the
decision logic?
43
4. DMN decision logic
44
Decision logic
• Using decision logic, the decision components of a DRD may be
specified in greater detail, to capture a complete set of business
rules and calculations, and (if desired) to allow the decision-
making to be fully automated
• At the decision logic level, every decision in a DRG is defined
using a value expression which specifies how the decision’s
output is determined from its inputs.
• At that level, the decision is considered to be the evaluation of
the expression. The value expression may be notated using a
boxed expression
45
Decision logic as boxed expressions
46
Three basic expression types
• Decision tables: logic based on rules
47
How to write decision logic?
• Natural language
• Unclear, ambiguous
• Logic
• Powerful, unambiguous, but not for business people
48
How to write decision logic?
• A decision or business knowledge model may contain any decision logic
which is capable of being represented as a function
• This will allow the import of many existing decision logic modelling
standards (e.g., for business rules and analytic models) into DMN
49
Decision logic as a decision table
50
5. Decision tables
51
Elements of a decision table in DMN
Hit policy
indicator Name of information item
Possible values
“-” means:
irrelevant in
this rule
Inputs Outputs
52
Decision table are not new
53
Why decision tables?
• Problems with lists of rules:
• The order of information items is not the same in all rules
• The name of information items is repeated in many rules
• Connectors can be and, or, with parentheses, etc.
• Rules are complex, hard to understand and hard to validate
• Default:
If rules are non-overlapping: unique hit
• Recognize others:
If rules are overlapping, then 1 rule has to be selected:
any hit, first hit, priority hit
55
Hit policies
Applicant Risk Rating
Hit policy
Inputs Outputs
• Hit policy:
• If one rule is required:
• Unique (if there is only one for every set of inputs) [default]
• Or select the desired one: Any, First, Priority
• If all applicable rules are required:
• Results in an output list (operations may be applied, e.g. sum(partialscores))
• List order is No order (arbitrary), Rule order, Output order
56
DMN Types of tables (Single hit)
• DMN identifies different table types, indicated by the first letter
Good
• Unique hit tables: every input case is included in one rule only. There is no overlap between
rules.
Ugly
• Any hit tables: every input case may be included in more than one rule, but the outcomes
are equal. Rules are allowed to overlap.
• Priority hit tables: multiple rules can match, with different outcome values. This policy
returns the matching rule with the highest output value priority (e.g. highest discount). The
priority order is determined by the order of listed output values in the output column
heading.
• First hit tables: multiple (overlapping) rules can match, with different outcome values. The
first hit by rule order is returned (and evaluation can halt). This is a common usage,
because it resolves inconsistencies by forcing the first hit. It is important to distinguish Bad
this type of table from others because the meaning depends on the sequence of the rules.
Because of this sequence, the table is hard to validate manually and therefore has to be
used with care.
57
Example decision logic
Strategy
(U) Pre-Bureau Eligibility Bureau Call Type Strategy
1 INELIGIBLE - DECLINE
Strategy 2 ELIGIBLE FULL, MINI BUREAU
Bureau Call Type
(U) Pre-bureau risk category Bureau Call Type 3 NONE CONTINUE
2 LOW MINI
3 DECLINE NONE
table with unique columns - complete
Pre-Bureau Eligibility
Bureau Pre-bureau
P Pre-Bureau risk category Instalment Affordable Age Monthly Income Pre-Bureau Eligibility
call type eligibility
1 DECLINE - - - INELIGIBLE
2 - False - - INELIGIBLE
3 - - < 18 - INELIGIBLE
4 - - - < 100 INELIGIBLE
5 - - - - ELIGIBLE
table with overlapping columns (priority INELIGIBLE > ELIGIBLE)
58
Unique hit decision tables
Applicant Risk Rating
U Applicant Risk
Applicant Age Medical History Rating
1 good Medium
> 60
2 bad High
3 [25..60] - Medium
4 good Low
< 25
5 bad Medium
Medical History
Applicant Risk Rating Applicant Risk Rating
good bad
Applicant Age < 25 [25..60] > 60
< 25 Low Medium
Medical History good bad - good bad
Applicant Risk Applicant Age [25..60] Medium Medium
Low Medium Medium Medium High
Rating
U 1 2 3 4 5 > 60 Medium High
• Comparison
• U tables often typically require more rules, but are less error prone
• A tables can make the underlying logic (relation input to output) more
easily understood
• P tables might be convenient when decision inputs have many
enumerated values, however they sometimes obscure the logic
60
Decision table validation
• What makes a good decision table?
• Completeness
• There should be no combination of allowed input values that does not match at least one rule
• Consistency
• In a U table, rules should not overlap
• In an A table, overlapping rules should have the same output value
• In a P table, no rule should be “masked” (appear below a rule that would always hit)
• Avoid subsumption
• Decision tables should not contain two or more rules that could be combined
• Apply decision table contraction
61
6. Expression language for decision
logic (FEEL)
62
Expressing the Decision Logic
• FEEL (“Friendly Enough Expression Language”) implements the required
mechanisms
• Built-in types, functions and operators S-FEEL note
• Every decision in a DRD can be defined using a formal expression High = “High”
that specifies how the decision’s output is determined from its inputs Risk Rating variable
• DMN can be extended to use other expression and type definition languages
63
FEEL
• Similar to functions in Excel
• Just an expression language that calculates values
• Useable by businesspeople
64
Conformance
Conformance
Level 1 Level 2
Notation,
Notation, Interchange
Interchange
+ S-FEEL
Level 3
Notation,
Interchange
+ FEEL
65
6. Conclusion
66
Issues DMN solves
• Separating decisions and processes
accept low risk
applicant
Age<20
refuse high
Bad Medical Record
21<=Age<50
accept
Good MedicalRecord medium risk
applicant
Age>=50
67
Issues DMN solves
• Separating decision structure and decision logic
• Allows to model decision relations, even if not all logic is expressed in
tables
68
Issues DMN solves
• Decision modelling methodology
• Keep the insights of the past and avoid confusion
• Good decision table models are a proven technique to represent
decision rules
• Consistency, completeness and correctness by design
69
Issues DMN solves
• Decision table types
• Recognize, and unambiguously exchange
• DMN allows multiple table types (good for exchange)
• Unique hit, Any hit (like in some methodologies), First hit (like in some tools), Multiple hit, …
• Good decision table models are much stricter
• Decision table methodology is a methodology, DMN is not
• There is nothing new in DMN about decision tables, but DMN allows to
standardize and recognize other decision table formats and avoids
ambiguity about the concept.
70
Application areas & tools
• Decisions, decisions, decisions
• Decisions in process modelling
• Process variability
71
Signavio
72
What should you know and what should
you be able to do?
• You should know:
• what the major elements are in DMN
• how to model decision requirements
• how to model decision logic in DMN
• what decision tables are, which types exist, and which criteria are important to validate
decision tables
• what an expression language entails, why it is important, and how FEEL is the
expression language for DMN
• You should be able to:
• build and analyse decision tables
• identify types of decision tables
73