Decision Modeling 2016 - Building Business Capability

*
Jan Vanthienen
Research and teaching:
KU Leuven (Belgium)
Leuven Institute for Research
in Information Systems
Business rules, processes and information
Decision models and tables
Data & Process analytics
Smart Business
[email protected]
*
Jan Vanthienen
KU Leuven
LIRIS (Leuven
Institute for
Research in
Information
Systems)
Faculty of Economics and Business
Business Information Systems Group
Research and teaching:
•
•
•
•
Business rules, processes and information systems
Information & Knowledge Management
Decision models & tables
Business intelligence & Analytics
• IBM Faculty Award
• Belgian Francqui Chair 2009 at FUNDP
- Bpost bank Research Chair
- Colruyt-Symeta Research Chair Smart Data and Decisions
- IBM Fund Intelligent Business Decision Making
- Microsoft Research Chair on Intelligent Environments
- PricewaterhouseCoopers Chair on E-Business
Email: [email protected]
(c) Jan Vanthienen, 2016
2
Decision Modeling Methodology
*
Decisions are important for business, not only processes.
Why would we only model the processes?
*
Where is the decision?
How is the decision logic modeled?
*
Model the Decision activity: Decide acceptance
?
(c) Jan Vanthienen, 2016
3
Decision Modeling Methodology
*
Decision(s) (logic) need to be modeled
* A standard for processes (BPMN) is not enough
* What is the decision?
*
Eligibility, rating, retention, offer,
selection, hire, credit, …
* What is required to make this decision?
*
*
*
*
Information
Knowledge sources
(regulations, analytics, expertise)
Other decisions
Decision logic
Decision Modeling & Notation standard (DMN)
(c) Jan Vanthienen, 2016
4
Decision Modeling Methodology
*
Modeling the decision structure
Modeling a single table
Modeling the Process Connection
(c) Jan Vanthienen, 2016
5
Decision Modeling Methodology
*
Decision trees should not be process paths
*
*
*
*
Do not hardcode decision rules
into the process model
accept low risk
applicant
Separating (decision) rules
from the process
simplifies the process
Age<20
Bad Medical Record
refuse high
risk applicant
21<=Age<50
Improved agility, reuse,
focus, visibility
Good MedicalRecord
Simplify nested decision paths:
Decide applicant type
accept
medium risk
applicant
Age>=50
Applicant type depends on:
o Age
o (and in some cases
also Medical Record)
(c) Jan Vanthienen, 2016
6
Decision Modeling Methodology
*
Exceptions?
Timers?
Happy path?
Decisions?
Decision logic?
Roles?
Messages?
Notifications?
Triggers?
Conditions?
…
(c) Jan Vanthienen, 2016
7
Decision Modeling Methodology
*
Decision models are not
lower level details of one process
*
Decisions models
can span
over multiple activities,
and even multiple processes
*
Sometimes the process is about one large decision
*
Separation of concerns
(c) Jan Vanthienen, 2016
Model of the decision(s)
8
Decision Modeling Methodology
*
Good decision table models are a proven
technique to represent decision rules
Consistency, completeness and correctness by design
Applicant Risk Rating
U
Applicant Age
1
2
3
> 60
[25..60]
4
5
< 25
(c) Jan Vanthienen, 2016
Medical History
Applicant Risk Rating
good
Medium
bad
High
-
Medium
good
Low
bad
Medium
9
Decision Modeling Methodology
*

Modeling the decision structure
Modeling a single table
Modeling the Process Connection
(c) Jan Vanthienen, 2016
10
Decision Modeling Methodology
*
* Decision tables (DT)
* Decision rules in a tabular format
* Decision table methodology (DTM)
* How to use a constrained form of decision tables in order to model decisions
* Goal-oriented decision modeling network
* Good decision table design
* Single hit tables (complete, consistent and correct), relations between
tables, table notation, contraction, optimization, normalization.
* Decision Modeling & Notation (DMN) standard
* Standard syntax and notation for exchange
* Recognize other forms of tables
* Combine tables with other concepts in decision modeling
* Standard expression language
(c) Jan Vanthienen, 2016
11
Decision Modeling Methodology
*
Requirements level
Logic level
(c) Jan Vanthienen, 2016
12
Decision Modeling Methodology
*
Informaton requirement
Knowledge requirement
Authority requirement
(c) Jan Vanthienen, 2016
13
Decision Modeling Methodology
*
* In a car rental company, a rental is offered or refused depending on age eligibility, dropoff validity and availability of the requested vehicle.
* The eligible age is 21-75.
* Drop-off is only valid inside branch hours for round-trips (Valid2way) or permitted oneways (Valid1way). Other drop-offs are invalid because of prohibited one-way
(Invalid1way) or outside branch hours (InvalidTimes).
* A vehicle is available if the requested car group is available (AsRequested) or if an
update group is available (Upgrade).
* There is a young driver premium (<25) and a senior premium (>65)
* A one-way charge is added.
* If the requested car group is not available, but an upgrade is available, the car group is
updated
(c) Jan Vanthienen, 2016
14
Decision Modeling Methodology
*
Conditions
Age < 21
Age > 75
Age < 25
Age > 65
Pick-up time outside branch hours
Return time outside branch hours
Rental is one-way
Drop-off branch in prohibited country
Car group availalable
Upgrade group available
Outcomes
Reject request
Add young driver premium
Add senior premium
Add one way charge
Upgrade group
Offer rental
(c) Jan Vanthienen, 2016
15
Decision Modeling Methodology
*
* Distinct tables
* A condition in one table requires the outcome of another
decision (table).
This means that a variable is a condition in one part
of the text and an outcome in another part, e.g.:
A rental is offered or refused
depending on … availability of the requested vehicle.
A vehicle is available if the requested car group is available (AsRequested) or if
an update group is available (Upgrade).
*
Normalization
If a table has multiple output variables, and not every variable depends on the
entire set of conditions (only on a subset),
then this variable can be split off.
(c) Jan Vanthienen, 2016
16
Decision Modeling Methodology
*
TypeOfOrder
CustomerLocation
KnownCustomer
Discount
Surplus
1
Web
US
Yes
Discount 10%
-
2
Web
US
No
No Discount
-
3
Web
Other
Yes
Discount 10%
ShipmentSurplus
4
Web
Other
No
No Discount
ShipmentSurplus
5
Phone
US
Yes
Discount 5%
-
6
Phone
US
No
No Discount
-
7
Phone
Other
Yes
Discount 5%
ShipmentSurplus
8
Phone
Other
No
No Discount
ShipmentSurplus
KnownCustomer
TypeOfOrder
Discount
1
Yes
Web
Discount 10%
1 US
-
2
Yes
Phone
Discount 5%
2 Other
x
3
No
-
No Discount
CustomerLocation
ShipmentSurplus
(Vanthienen J., Snoeck M., Knowledge Factoring Using Normalization Theory, International Symposium on the Management of
Industrial and Corporate Knowledge (ISMICK'93), Compiègne (FR), pp. 97-106, October 27-28, 1993.)
(c) Jan Vanthienen, 2016
17
Decision Modeling Methodology
*
Modeling the decision structure

Modeling a single table
Modeling the Process Connection
(c) Jan Vanthienen, 2016
18
Decision Modeling Methodology
*
* Natural language
*
Unclear, ambiguous
* Logic
*
Powerful, unambiguous, but not for business people
* Structured English Rules
*
*
Subset of natural English
Trade-off between:
* easy of use (but not very powerful)
* powerful (but difficult to use)
* Decision trees, tables, graphs, diagrams
*
Different representations for different purposes:
acquisition, V&V, decision making, dependencies, impact analysis
* Object Constraint Language
*
*
Part of UML
Useful for pre- and postconditions
(c) Jan Vanthienen, 2016
19
Decision Modeling Methodology
*
(c) Jan Vanthienen, 2016
20
Decision Modeling Methodology
*
Information items
"rules"
(rows)
values
Outputs
Inputs
* If CustomerType = US and OrderType = Web then Discount = 8%
* If CustomerType = US and OrderType = Phone then Discount = 5%
* If CustomerType = non US
then Discount = 0%
* Inputs in one rule are always ANDed. No ORs, no parentheses
* Every row is a rule
* The order of the inputs is the same for every rule
* “-” means: does not matter in this rule (irrelevant)
(c) Jan Vanthienen, 2016
21
Decision Modeling Methodology
*
* E.g. If CustomerType = US and OrderType = Phone then Discount = ?
If a customer is of CustomerType US, and the Ordertype is Phone
*
*
Rule 1 actually covers two cases: US, Web and US, Phone
Rule 2 actually covers two cases: US, Phone and non US, Phone
Possible solutions:
* First: Take the first rule that applies (from top to bottom) and stop (8%)
* Unique: Make sure the rules do not overlap
* Any: Allow rules to overlap, but only if the output is the same
* Priority: Take the output with the highest priority, listed in decreasing order
* Collect (and add) the output of every rule that applies (13%)
(c) Jan Vanthienen, 2016
22
(5%)
Decision Modeling Methodology
*
DMN identifies different table types, indicated by the first letter:
Single hit (returns one rule):
* If only one rule can match every case: (U)nique hit indicator
Good
* If more then one rule can match a certain case: Choose only
one
The Hit Indicator tells which one: A(ny), P(riority of outcome),
F(irst)
Ugly
Bad
Multiple hit:
* If all applicable rules are required:
*
*
*
results in an output collection (list, or operation on list)
List order is No order (arbitrary), Rule order, Output order
An operation may be applied, e.g. C+
(c) Jan Vanthienen, 2016
23
Decision Modeling Methodology
*
Overlapping rows but with the same conclusion
Eligibility
A Pre-Bureau Risk Category Pre-Bureau Affordability Expert Review
1
ACCEPT
TRUE
2
ACCEPT
3
FALSE
DECLINE
4
DECLINE
TRUE
DECLINE
Eligibility
ELIGIBLE
ELIGIBLE
INELIGIBLE
INELIGIBLE
(A)ny hit table
If (ACCEPT, TRUE, ACCEPT): rule 1 matches
If (ACCEPT, TRUE, ACCEPT): rule 2 matches
-> multiple rules can apply: choose Any
What if the outcome of one rule is changed? Contradiction
(not well normalized)
(c) Jan Vanthienen, 2016
24
Decision Modeling Methodology
*
Overlapping rows but with different conclusions
Eligibility
F Pre-Bureau Risk Category Pre-Bureau Affordability Expert Review
1
ACCEPT
TRUE
2
ACCEPT
3
-
Eligibility
ELIGIBLE
ELIGIBLE
INELIGIBLE
(F)irst hit table
If (ACCEPT, TRUE, DECLINE): rule 1 matches
If (ACCEPT, TRUE, DECLINE): rule 3 matches
-> multiple rules can apply: choose the first one
The last rule here is some kind of default value (ELSE rule)
It is important to distinguish this type of table from others because the
meaning depends on the sequence of the rules: hard to validate manually
(c) Jan Vanthienen, 2016
25
Decision Modeling Methodology
*
* Some of this is methodology
* But if you can choose 2 out of 3, what do you choose?
Correct
Compact
(c) Jan Vanthienen, 2016
Consistent
26
Decision Modeling Methodology
*
Applicant Risk Rating
U
Applicant Age
1
2
3
4
5
Medical History
good
bad
good
bad
> 60
[25..60]
< 25
Applicant Risk Rating
Medium
High
Medium
Low
Medium
Medical History
Applicant Risk Rating
good
bad
< 25
Low
Medium
[25..60]
Medium
Medium
> 60
Medium
High
Applicant Risk Rating
Applicant Age
< 25
[25..60]
> 60
Applicant Age
Medical History
good
bad
-
good
bad
Applicant Risk Rating
Low
Medium
Medium
Medium
High
U
1
2
3
4
5
[25..60]
> 60
Applicant Risk Rating
Applicant Age
Medical History
Low
Medium
High
U
(c) Jan Vanthienen, 2016
< 25
good
bad
-
good
bad
X
X
X
X
-
1
2
3
4
X
5
27
Decision Modeling Methodology
*
• Exclusivity
C
column 4 subsumes column 1
• (C11,C21)
• (C11,C22)
• (C12,C21)
• (C12,C22)
• ...
• (x,x)
• (x,-)
• (-,x)
• (-,-)
• ...
A
• Completeness
(c) Jan Vanthienen, 2016
28
Decision Modeling Methodology
*
TypeOfOrder
CustomerLocation
Discount
1
Web
US
Discount 10%
2
Web
Europe
Discount 5%
3
Web
Other
No Discount
4
Phone
US
Discount 10%
5
Phone
Europe
Discount 5%
6
Phone
Other
No Discount
Key
Result
CustomerLocation
TypeOfOrder
Action
1
US
-
Discount 10%
2
Europe
-
Discount 5%
3
Other
-
No Discount
The whole key …
1NF
2NF
3NF
BCNF
and nothing but the key …
Vanthienen J., Wets G., Integration of the Decision Table Formalism with a Relational Database Environment,
Information Systems, Vol. 20, No. 7, pp. 595-616, 1995.
(c) Jan Vanthienen, 2016
29
Decision Modeling Methodology
*
* If you have a lot of inputs, rules in rows becomes cumbersome: use
rules in columns
Eligibility
U Pre-Bureau Risk Category
Accept, Decline
1
One more input
And another input
Pre-Bureau Affordability Expert Review
Accept, Decline
Result
Eligible, Ineligible
* If you have a lot of rules, rules in columns fill the page: use rules in
rows
Eligibility
Pre-Bureau Risk Category
One more input
And another input
Pre-Bureau Affordability
Expert Review
Result
U
(c) Jan Vanthienen, 2016
1
30
Decision Modeling Methodology
*
*
Building the tables
1. Interactive method
Decision elicitation, interview sessions
We discover variables (conditions and outcomes) on the fly
2. Direct construction method
When a description, text is available
Completeness and consistency by design
3. Decision logic mining
Rule mining: one table, multiple tables, decision + process
(c) Jan Vanthienen, 2016
31
Decision Modeling Methodology
*
* Structure and content
*
*
*
*
*
Basic structure and the importance of completeness and consistency
Extended entry tables (multi-valued conditions)
Exclusivity and completeness of the condition entries (domain partitioning)
Exclusivity and completeness of the columns (types of tables)
Types of actions
* Form, conciseness and readability
*
*
*
*
*
*
*
*
Horizontal or vertical format
The order of the rules is irrelevant, but not for humans
Group-oriented contraction
The order of the conditions is irrelevant, except for display size
Row order optimization
Tree notation
Block-oriented notation
Representing relations between conditions (indicating impossible values)
* Factoring and normalization
*
*
Subtables
Intertabular verification
* Purpose and pragmatics
*
(c) Jan Vanthienen, 2016
Decision logic and structure
32
Decision Modeling Methodology
*
- "If the product is in stock, we normally deliver.
If not, the order is waitlisted.
This only applies if the order is within the credit limit."
- "Ok, what happens if the CreditLimit is exceeded?"
- "It depends."
- "On what?"
- "On the type of customer."
- "What do you mean?"
- "Well, in that case we will refuse the order for bad
customers, but for a good customer the normal procedure
applies."
- "That means execute or waitlist, depending on the
stock?"
- "Yes"
- How do you decide the type of customer?
-…
(c) Jan Vanthienen, 2016
33
Decision Modeling Methodology
*
1.
Define the conditions, the condition values and the outcomes.
Age
<18
[18 .. 45)
[45 .. 60)
Service
<15
[15 .. 30)
>=30
>=60
2.
Construct the empty table: list conditions and outcomes, fill out the condition
entries of the table (the lower conditions will vary first).
3.
Describe the problem using logical expressions, where outcomes and
(combinations of) condition values are related in logical expressions.
4.
Fill in the outcome entries (column by column or action by action), based on the
logical expressions.
5.
6.
Check table for completeness, correctness and consistency
Simplify the decision table
(c) Jan Vanthienen, 2016
34
Decision Modeling Methodology
*
* Separating decisions and processes
* Using a standard modeling notation.
accept low risk
applicant
Age<20
Bad Medical Record
refuse high
risk applicant
21<=Age<50
Good MedicalRecord
accept
medium risk
applicant
Age>=50
(c) Jan Vanthienen, 2016
35
Decision Modeling Methodology
*
* Separating decision structure and decision logic
* Allows to model decision relations, even if not all logic is
expressed in tables.
(c) Jan Vanthienen, 2016
36
Decision Modeling Methodology
*
* Decision modeling 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
(c) Jan Vanthienen, 2016
37
Decision Modeling Methodology
*
* DMN allows multiple taple types (good for exchange)
*
*
*
Unique hit, Any hit (like in TDM), First hit (like in some tools), Multiple hit, …
Good decision table models are much stricter
Decision table methodology is a methodology, DMN is not
* 16 principles
* There is nothing really new in DMN about decision tables, but
DMN allows to standardize and recognize other decison table
formats and avoids ambiguity about the concept.
* Combines tables with other concepts in decision modeling
* Standard expression language
(c) Jan Vanthienen, 2016
38
Decision Modeling Methodology
*
* Standard notation for exchange and implementation
* Strict notation and simple expression language ((S-)FEEL).
* FEEL (“Friendly Enough Expression Language) implements
the required mechanisms
* Built-in types, functions and operators
* Every decision in a DRD can be defined using a formal expression that
specifies how the decision’s output is determined from its inputs
* Complete decision models can be defined
* Formal expressions may also be encapsulated as functions
* Supports abstraction, composition, and scalability
* S-FEEL (“Simple FEEL”) is a basic subset of FEEL designed to cover
the essential requirements of Decision Table-based DMN models
(c) Jan Vanthienen, 2016
39
Decision Modeling Methodology
*
Modeling the decision structure
Modeling a single table
 Modeling the Process Connection
(c) Jan Vanthienen, 2016
40
Decision Modeling Methodology
*
Sometimes the entire process
is about a decision
*
Model the decision first,
and then think about how
to execute it
*
The same decision
can be processed in many ways
*
The process of
making a decision
depends on the
desired criteria
(throughput, efficiency,
customer comfort, …)
(c) Jan Vanthienen, 2016
41
Decision Modeling Methodology
*
naturalization
Start each individual decision activity as
soon as all its preconditions are fulfilled
Avoid superfluous decision activities
(unnecessary work)
Group customer contacts
(c) Jan Vanthienen, 2016
42
Decision Modeling Methodology
*
* DMN models the logic of a decision, but allows to answer different decision
questions.
* E.g.: the holidays decision table
* There is more than the basic big decision : John Doe is 50 and has 30 years of
service, how many days does he get?
* The model also allows to answer (given a powerful execution engine…):
* What if I turn 45?
* Why do I get 27 days?
* What do I have to change to obtain x days?
* How do I get the maximum? (optimization)
* I have incomplete data, what can I already decide/exclude
*…
(c) Jan Vanthienen, 2016
43
Decision Modeling Methodology
*
*
Huysmans J, Dejaeger K, Mues C, Vanthienen J, Baesens B, An empirical evaluation of the
comprehensibility of decision table, tree and rule based predictive models, 2011, Decision Support
Systems, vol. 51, no. 1, pp. 141 - 154.
*
Moreno A, Verhelle M and Vanthienen J, Decision tables: An Overview of the Existing Literature, GIACA,
Information Technologies in Accounting, Fifth International Conference on Artificial Intelligence and
Emerging Technologies in Accounting, Finance and Tax (Huelva, Spain 2000)
www.econ.kuleuven.ac.be/prologa/download/overview82-2000.pdf
*
Vanthienen, J. (2007). How Business Rules (Re)define Business Processes: A Service Oriented View, 10th
International Business Rules Forum, Orlando, FL (USA), Oct. 21-25.
*
Vanthienen J, Mues C, Aerts A, An illustration of verification and validation in the modelling phase of KBS
development, Data & knowledge engineering, vol. 27, no. 3, pp. 337–352, 1998.
*
Vanthienen J., Wijsen J., On the Decomposition of Tabular Knowledge Systems, New Review of Applied
Expert Systems, pp. 77-89, 1996.
Publications on decision tables:
http://feb.kuleuven.be/prologa/publications.htm
Research topics:
Decision & Process Modeling, Mining and Analytics
http://feb.kuleuven.be/drc/LIRIS/misc/JVResearch
(c) Jan Vanthienen, 2016
44
Decision Modeling Methodology