SlideShare a Scribd company logo
DMN
on Steroids 2.0
To Decision Tables and beyond
Who am I ?
Holisticon AG is a Management and IT
consulting company based in Hamburg,
Germany.
■ Founded 2007 // 13+ years
■ Offices in Hamburg, Hannover, Kiel
■ About 70+ handpicked consultants
■ Camunda Advanced Partner
Jan Galinski
■ ~ 15 years Workflow Management
■ ~ 8 years with Camunda
■ Contributor and (Co-)Author of
spring-boot-starters, mockito extension,
reactor extension, …
■ Camunda User Group Hamburg
■ BPM Craftsman, Consultant, Developer
https://about.me/jangalinski
What is DMN ?
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 5
What is DMN?1 – Decision Table
https://camunda.com/dmn/simulator/
AND
OR
FEEL
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 6
What is DMN?2 - DRG
https://camunda.com/dmn/simulator/
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 7
Benefits of DMN
OMG Standard No vendor lock-in
Business IT Alignment Business can read and write decisions
Executable No separation of build and runtime model
Transparency What decision was made based on which input and when?
Flexibility Change how your decisions are made, without downtime
!
Why this talk?
Motivation
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 9
Project: BPMN
■ On Task create:
evaluate DMN table
■ On gateway decision:
evaluate DMN table
■ On Business Data change:
reevaluate task assignment
■ ~ 50 DMN tables (one per task)*
■ Up to 1000 rows/table
■ ~ 10k tasks per day*
■ ~ 10 reassignments per day*
CamundaCon 2017
https://www.youtube.com/watch?v=5t_R6pFGk10
https://github.com/holunda-io/example-task-assignment-with-dmn
Motivation
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 10
Project: CMMN
■ SENTRY:
Boolean Function (aka Predicate)
■ Implemented by DMN
■ ~ 100 Decision Tables
■ Ø 20 inputs, 20 rows
■ ~ 35M executions per day
■ Multi-Tenant
■ Experimental constraints
CamundaCon 2018
https://www.youtube.com/watch?v=QmacEUt7y_I&t=766s
Motivation
Rules of
Enterprise DMN
5
Make your rules explicit!
1
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 13
Make your rules explicit1
■ Requirement Engineering
 „We must only execute this action, if the customer is an adult!“
 „What does that mean?“
 „Well, in Germany, this means, the person has to be at least 18 years old!“
 „I thought 21?“
 „No, they changed that 50 years ago.“
 „OK, will do!“
1
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 14
Make your rules explicit2
■ Input: interpreted value
■ Business relevant comparison done by some service
■ Runtime: „Hey Jan, why was this action not allowed?“ –
„I will have to check with Simon, he wrote the isAdultSubComponent!“ –
„Stay until this is solved!“
1
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 15
Make your rules explicit3
■ Input: age of customer
■ Comparison done by decision table
■ Runtime: „Hey Jan, why was this action not allowed?“ –
„Well the rule said, he had to be 18, but he was only 17!“ –
„Thanks, Jan! Have a nice weekend!“
1
Use FEEL!
2
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 17
Use FEEL1
■ Requirement Engineering
 „We must only execute this action, if the customer is an adult!“
 „I have an idea! Camunda supports
multiple expression languages in decision tables!“
 „I trust your judgement“
2
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 18
Use FEEL2
■ Input: customerId, no need for additional services
■ Business relevant comparison done by groovy code in decision table
■ Runtime: „Hey Jan, why was this action not allowed? It clearly says: 18“ –
„Hm. Some Bug with our DateUtils? The customers birthday is ok! “ –
„Stay until this is solved!“
Using GROOVY*
2
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 19
Use FEEL3 - Benefits
Simple
No complex calculations,
only comparison
Business IT
alignment
Business can read* and write* decisions
Execution Pure functions – DMN as „black box“
2
DMN != <code>
3
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 21
DMN != <code>1
■ Requirement Engineering
 „We have a new government. Adulthood now starts at age 16! What do we do“
 „ Too bad. We have our DMN files in src/main/recources, like our BPMN files.
We will have to alter them and do a deployment.“
 „Can you do it, please?“
 „Of course! File a jira issue, we have a deployment scheduled for next Thursday
anyway!“
 „I need it now!“
 „Wait a minute … we got an enterprise license, right?“
3
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 22
DMN != <code>2
3
?
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 23
DMN != <code>3
■ Next Thursday
 „Major incident! You have to be 18 again to be an adult! What happened!“
 „We did the scheduled deployment this morning.
And as I said: the DMN files are part of our code base, so we deployed them over your
hot fixes!“
 „That‘s going to be long day, my friend!“
3
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 24
DMN != <code>4
 „Well, good news, then: We can change
and deploy our rules as part of the
configuration, without modifying the
core app.“
 „Will that require a downtime? Should I
inform operations?“
 „ No need to, just give me a second ….“
 „Well done, Jan!“
3
Process
Application
(DMN) Config
Repository
Camunda DB
■ Requirement Engineering
 „We have a new goverment. Adulthood now starts at age 16! What do we do“
 „Did the required inputs change?“
 „No!“
Generate DMN!
4
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 26
Generate DMN1
■ Requirement Engineering
 „Remember that little DMN project we set up last year?“
 „Of course! Great success, right? “
 „Well, kind of … we expanded our business, now look at this …“
4
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 27
4Generate DMN2
https://en.wikipedia.org/wiki/Age_of_majority
(„Saudi Arabia“ AND (age>=15 OR puberty==true)
Order of rules
All other states
Default rule
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 28
Generate DMN3
■ Complex tables?
■ Large tables?
■ Complex boolean logic?
■ Hit Policies?
■ Rule ordering?
4
?trivial
I can!
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 29
Generate DMN4
4
■ Camunda can generate decision tables
 But not decision graphs
■ Unintuitive direct XML API
Divide and conquer
5
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 31
Divide and conquer1
■ Requirement Engineering
 „OK, we got generators in place, but it‘s still hard to manage the DMN tables!“
 „Why so?“
 „Well, turned out is customer adult was not our only concern …“
5
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 32
Divide and conquer2
5Legal aspects Product aspects
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 33
Divide and conquer3
■ Options to split large tables into smaller ones
 One table per region (sellproduct_germany.dmn, sellproduct_korea.dmn)
 Chained execution of multiple tables: first legal aspects, then product aspects
 Combined approach
■ Options to execute chained tables
 Create a custom BPMN evaluation process
 Use DMN Decision Requirement Graphs (DRG)
5
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 34
Divide and conquer4 - DRG
■ OK, but …
 50 Products= 50 Decison Graphs
 Camunda does not support table references = 50 copies of the legal aspects table
 When legal aspects change, you have to edit 50 tables
5
Ramp up
Summary
■ Make your rules explicit
 Context just delivers data
 DMN does the comparison
■ Use Feel
 Keep it simple
■ DMN != <code>
 Do not put *.dmn files in src/main/resources
■ Generate DMN
 Computers are better at modifying large tables
■ Divide and Conquer
 Multiple small tables are easier to handle
than one large table
 Use separate files for separate concerns
 Generate DRGs
Ramp up
■ Bonus
 Decision History grows fast. Use TTL, think
about clean up strategies
 Consider how you want to test your DMNs …
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 37
Demoextension: camunda-decision
DMN on Steroids 2.0 | jan.galinski@holisticon.de | 38
Demoextension: camunda-decision
camunda-decision
https://www.holunda.io/camunda-decision/
 maven-central*
 Active development
 Contributions welcome
What next?
Outlook
. . .. . .
■ Property based testing
ensure the rules are correct for all possible inputs
■ Validation
using dmnCheck
■ Schema based Query/Result Objects
Becoming full type safe, generate code
■ Support complex input objects
currently limited to primitives
■ Caching
do not recalculate when nothing changed
■ Distributed Systems
event driven architecture/axon
■ Simulation
How would the system behavior change?
■ Auditing/Cockpit
better tracing/tracking of decision evaluations
Roadmap
Documentation, Documentation, Documentation
Buildtime Runtime
https://github.com/davidibl/dmnmgr-server
Have a look at …
dmn-check
■ DMN File validation
 Duplicate rules
 Conflicting rules
 Shadowed rules
 Types of the expressions
 Correct use of enumerations
 Correctly connected requirement graphs
https://github.com/red6/dmn-check
■ Camunda Modeler Extension
 Define input/output via OpenAPI
 Git repo as DMN store
 Validation (using dmn-check)
 Simulation
 Client/Server architecture
dmnmgr
Questions?

More Related Content

Similar to Camunda con2020 dmn on steroids 2

You are the process! From normative to adaptive Processes – SOA | BPM Integra...
You are the process! From normative to adaptive Processes – SOA | BPM Integra...You are the process! From normative to adaptive Processes – SOA | BPM Integra...
You are the process! From normative to adaptive Processes – SOA | BPM Integra...OPITZ CONSULTING Deutschland
 
SFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdf
SFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdfSFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdf
SFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdfSouth Tyrol Free Software Conference
 
Top 5 tips to get your data squeaky clean, Andre van Kampen
Top 5 tips to get your data squeaky clean, Andre van KampenTop 5 tips to get your data squeaky clean, Andre van Kampen
Top 5 tips to get your data squeaky clean, Andre van KampenCzechDreamin
 
Avoid Poor Project Outcomes
Avoid Poor Project OutcomesAvoid Poor Project Outcomes
Avoid Poor Project OutcomesTamim Rahman
 
Rethinking the agile enterprise
Rethinking the agile enterpriseRethinking the agile enterprise
Rethinking the agile enterpriseBrandon Byars
 
1208 1450 how digital transformation affects plm pi berlin 2017
1208 1450 how digital transformation affects plm   pi berlin 20171208 1450 how digital transformation affects plm   pi berlin 2017
1208 1450 how digital transformation affects plm pi berlin 2017Jos Voskuil
 
recommendation = optimization(prediction)
recommendation = optimization(prediction)recommendation = optimization(prediction)
recommendation = optimization(prediction)Wit Jakuczun
 
When your release plan is concluded at the HR office - Hanan Zakai
When your release plan is concluded at the HR office - Hanan  ZakaiWhen your release plan is concluded at the HR office - Hanan  Zakai
When your release plan is concluded at the HR office - Hanan ZakaiCodeValue
 
Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...
Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...
Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...Hans Smorenburg
 
What does a digitally transformed company really look like?
What does a digitally transformed company really look like?What does a digitally transformed company really look like?
What does a digitally transformed company really look like?Dr. Clemens Eckert
 
Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!TechWell
 
Alliance 2017 - Advanced CRM Tips and Tricks
Alliance 2017 - Advanced CRM Tips and TricksAlliance 2017 - Advanced CRM Tips and Tricks
Alliance 2017 - Advanced CRM Tips and TricksSparkrock
 
Dynamics Day 2012: Tips and Tricks with CRM 2011
Dynamics Day 2012: Tips and Tricks with CRM 2011Dynamics Day 2012: Tips and Tricks with CRM 2011
Dynamics Day 2012: Tips and Tricks with CRM 2011Intergen
 
Rethinking business decisions and processes for digital transformation
Rethinking business decisions and processes for digital transformationRethinking business decisions and processes for digital transformation
Rethinking business decisions and processes for digital transformationJudy Breedlove
 
Developing a Long-Term Digital Strategy
Developing a Long-Term Digital StrategyDeveloping a Long-Term Digital Strategy
Developing a Long-Term Digital StrategyOne North
 
BPMN and DMN for Processing Business Data with Camunda
BPMN and DMN for Processing Business Data with CamundaBPMN and DMN for Processing Business Data with Camunda
BPMN and DMN for Processing Business Data with CamundaAndré Borgonovo
 
FREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATION
FREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATIONFREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATION
FREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATIONTXM Lean Solutions
 
How to successfully engage enterprise software vendors – software selection
How to successfully engage enterprise software vendors – software selectionHow to successfully engage enterprise software vendors – software selection
How to successfully engage enterprise software vendors – software selectionJohn Cachat
 

Similar to Camunda con2020 dmn on steroids 2 (20)

You are the process! From normative to adaptive Processes – SOA | BPM Integra...
You are the process! From normative to adaptive Processes – SOA | BPM Integra...You are the process! From normative to adaptive Processes – SOA | BPM Integra...
You are the process! From normative to adaptive Processes – SOA | BPM Integra...
 
SFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdf
SFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdfSFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdf
SFScon22 - Michael Meeks - Sustained Digital Sovereignty with Free Software.pdf
 
Top 5 tips to get your data squeaky clean, Andre van Kampen
Top 5 tips to get your data squeaky clean, Andre van KampenTop 5 tips to get your data squeaky clean, Andre van Kampen
Top 5 tips to get your data squeaky clean, Andre van Kampen
 
Avoid Poor Project Outcomes
Avoid Poor Project OutcomesAvoid Poor Project Outcomes
Avoid Poor Project Outcomes
 
Rethinking the agile enterprise
Rethinking the agile enterpriseRethinking the agile enterprise
Rethinking the agile enterprise
 
1208 1450 how digital transformation affects plm pi berlin 2017
1208 1450 how digital transformation affects plm   pi berlin 20171208 1450 how digital transformation affects plm   pi berlin 2017
1208 1450 how digital transformation affects plm pi berlin 2017
 
recommendation = optimization(prediction)
recommendation = optimization(prediction)recommendation = optimization(prediction)
recommendation = optimization(prediction)
 
When your release plan is concluded at the HR office - Hanan Zakai
When your release plan is concluded at the HR office - Hanan  ZakaiWhen your release plan is concluded at the HR office - Hanan  Zakai
When your release plan is concluded at the HR office - Hanan Zakai
 
Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...
Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...
Agiletour 2013 Lean Application maintenance way to success, Quint Hans Smoren...
 
Fast close slides
Fast close slidesFast close slides
Fast close slides
 
What does a digitally transformed company really look like?
What does a digitally transformed company really look like?What does a digitally transformed company really look like?
What does a digitally transformed company really look like?
 
Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!Pay Now or Pay More Every Day: Reduce Technical Debt Now!
Pay Now or Pay More Every Day: Reduce Technical Debt Now!
 
Alliance 2017 - Advanced CRM Tips and Tricks
Alliance 2017 - Advanced CRM Tips and TricksAlliance 2017 - Advanced CRM Tips and Tricks
Alliance 2017 - Advanced CRM Tips and Tricks
 
Dynamics Day 2012: Tips and Tricks with CRM 2011
Dynamics Day 2012: Tips and Tricks with CRM 2011Dynamics Day 2012: Tips and Tricks with CRM 2011
Dynamics Day 2012: Tips and Tricks with CRM 2011
 
Rethinking business decisions and processes for digital transformation
Rethinking business decisions and processes for digital transformationRethinking business decisions and processes for digital transformation
Rethinking business decisions and processes for digital transformation
 
Quality control for CAD managers
Quality control for CAD managersQuality control for CAD managers
Quality control for CAD managers
 
Developing a Long-Term Digital Strategy
Developing a Long-Term Digital StrategyDeveloping a Long-Term Digital Strategy
Developing a Long-Term Digital Strategy
 
BPMN and DMN for Processing Business Data with Camunda
BPMN and DMN for Processing Business Data with CamundaBPMN and DMN for Processing Business Data with Camunda
BPMN and DMN for Processing Business Data with Camunda
 
FREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATION
FREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATIONFREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATION
FREE DOWNLOAD - INTRODUCTION TO LEAN PRESENTATION
 
How to successfully engage enterprise software vendors – software selection
How to successfully engage enterprise software vendors – software selectionHow to successfully engage enterprise software vendors – software selection
How to successfully engage enterprise software vendors – software selection
 

Recently uploaded

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownloadvrstrong314
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...rajkumar669520
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisNeo4j
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandIES VE
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILNatan Silnitsky
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
 

Recently uploaded (20)

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 

Camunda con2020 dmn on steroids 2

  • 1. DMN on Steroids 2.0 To Decision Tables and beyond
  • 3. Holisticon AG is a Management and IT consulting company based in Hamburg, Germany. ■ Founded 2007 // 13+ years ■ Offices in Hamburg, Hannover, Kiel ■ About 70+ handpicked consultants ■ Camunda Advanced Partner Jan Galinski ■ ~ 15 years Workflow Management ■ ~ 8 years with Camunda ■ Contributor and (Co-)Author of spring-boot-starters, mockito extension, reactor extension, … ■ Camunda User Group Hamburg ■ BPM Craftsman, Consultant, Developer https://about.me/jangalinski
  • 5. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 5 What is DMN?1 – Decision Table https://camunda.com/dmn/simulator/ AND OR FEEL
  • 6. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 6 What is DMN?2 - DRG https://camunda.com/dmn/simulator/
  • 7. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 7 Benefits of DMN OMG Standard No vendor lock-in Business IT Alignment Business can read and write decisions Executable No separation of build and runtime model Transparency What decision was made based on which input and when? Flexibility Change how your decisions are made, without downtime !
  • 9. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 9 Project: BPMN ■ On Task create: evaluate DMN table ■ On gateway decision: evaluate DMN table ■ On Business Data change: reevaluate task assignment ■ ~ 50 DMN tables (one per task)* ■ Up to 1000 rows/table ■ ~ 10k tasks per day* ■ ~ 10 reassignments per day* CamundaCon 2017 https://www.youtube.com/watch?v=5t_R6pFGk10 https://github.com/holunda-io/example-task-assignment-with-dmn Motivation
  • 10. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 10 Project: CMMN ■ SENTRY: Boolean Function (aka Predicate) ■ Implemented by DMN ■ ~ 100 Decision Tables ■ Ø 20 inputs, 20 rows ■ ~ 35M executions per day ■ Multi-Tenant ■ Experimental constraints CamundaCon 2018 https://www.youtube.com/watch?v=QmacEUt7y_I&t=766s Motivation
  • 12. Make your rules explicit! 1
  • 13. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 13 Make your rules explicit1 ■ Requirement Engineering  „We must only execute this action, if the customer is an adult!“  „What does that mean?“  „Well, in Germany, this means, the person has to be at least 18 years old!“  „I thought 21?“  „No, they changed that 50 years ago.“  „OK, will do!“ 1
  • 14. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 14 Make your rules explicit2 ■ Input: interpreted value ■ Business relevant comparison done by some service ■ Runtime: „Hey Jan, why was this action not allowed?“ – „I will have to check with Simon, he wrote the isAdultSubComponent!“ – „Stay until this is solved!“ 1
  • 15. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 15 Make your rules explicit3 ■ Input: age of customer ■ Comparison done by decision table ■ Runtime: „Hey Jan, why was this action not allowed?“ – „Well the rule said, he had to be 18, but he was only 17!“ – „Thanks, Jan! Have a nice weekend!“ 1
  • 17. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 17 Use FEEL1 ■ Requirement Engineering  „We must only execute this action, if the customer is an adult!“  „I have an idea! Camunda supports multiple expression languages in decision tables!“  „I trust your judgement“ 2
  • 18. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 18 Use FEEL2 ■ Input: customerId, no need for additional services ■ Business relevant comparison done by groovy code in decision table ■ Runtime: „Hey Jan, why was this action not allowed? It clearly says: 18“ – „Hm. Some Bug with our DateUtils? The customers birthday is ok! “ – „Stay until this is solved!“ Using GROOVY* 2
  • 19. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 19 Use FEEL3 - Benefits Simple No complex calculations, only comparison Business IT alignment Business can read* and write* decisions Execution Pure functions – DMN as „black box“ 2
  • 21. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 21 DMN != <code>1 ■ Requirement Engineering  „We have a new government. Adulthood now starts at age 16! What do we do“  „ Too bad. We have our DMN files in src/main/recources, like our BPMN files. We will have to alter them and do a deployment.“  „Can you do it, please?“  „Of course! File a jira issue, we have a deployment scheduled for next Thursday anyway!“  „I need it now!“  „Wait a minute … we got an enterprise license, right?“ 3
  • 22. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 22 DMN != <code>2 3 ?
  • 23. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 23 DMN != <code>3 ■ Next Thursday  „Major incident! You have to be 18 again to be an adult! What happened!“  „We did the scheduled deployment this morning. And as I said: the DMN files are part of our code base, so we deployed them over your hot fixes!“  „That‘s going to be long day, my friend!“ 3
  • 24. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 24 DMN != <code>4  „Well, good news, then: We can change and deploy our rules as part of the configuration, without modifying the core app.“  „Will that require a downtime? Should I inform operations?“  „ No need to, just give me a second ….“  „Well done, Jan!“ 3 Process Application (DMN) Config Repository Camunda DB ■ Requirement Engineering  „We have a new goverment. Adulthood now starts at age 16! What do we do“  „Did the required inputs change?“  „No!“
  • 26. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 26 Generate DMN1 ■ Requirement Engineering  „Remember that little DMN project we set up last year?“  „Of course! Great success, right? “  „Well, kind of … we expanded our business, now look at this …“ 4
  • 27. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 27 4Generate DMN2 https://en.wikipedia.org/wiki/Age_of_majority („Saudi Arabia“ AND (age>=15 OR puberty==true) Order of rules All other states Default rule
  • 28. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 28 Generate DMN3 ■ Complex tables? ■ Large tables? ■ Complex boolean logic? ■ Hit Policies? ■ Rule ordering? 4 ?trivial I can!
  • 29. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 29 Generate DMN4 4 ■ Camunda can generate decision tables  But not decision graphs ■ Unintuitive direct XML API
  • 31. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 31 Divide and conquer1 ■ Requirement Engineering  „OK, we got generators in place, but it‘s still hard to manage the DMN tables!“  „Why so?“  „Well, turned out is customer adult was not our only concern …“ 5
  • 32. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 32 Divide and conquer2 5Legal aspects Product aspects
  • 33. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 33 Divide and conquer3 ■ Options to split large tables into smaller ones  One table per region (sellproduct_germany.dmn, sellproduct_korea.dmn)  Chained execution of multiple tables: first legal aspects, then product aspects  Combined approach ■ Options to execute chained tables  Create a custom BPMN evaluation process  Use DMN Decision Requirement Graphs (DRG) 5
  • 34. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 34 Divide and conquer4 - DRG ■ OK, but …  50 Products= 50 Decison Graphs  Camunda does not support table references = 50 copies of the legal aspects table  When legal aspects change, you have to edit 50 tables 5
  • 36. ■ Make your rules explicit  Context just delivers data  DMN does the comparison ■ Use Feel  Keep it simple ■ DMN != <code>  Do not put *.dmn files in src/main/resources ■ Generate DMN  Computers are better at modifying large tables ■ Divide and Conquer  Multiple small tables are easier to handle than one large table  Use separate files for separate concerns  Generate DRGs Ramp up ■ Bonus  Decision History grows fast. Use TTL, think about clean up strategies  Consider how you want to test your DMNs …
  • 37. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 37 Demoextension: camunda-decision
  • 38. DMN on Steroids 2.0 | jan.galinski@holisticon.de | 38 Demoextension: camunda-decision
  • 41. . . .. . . ■ Property based testing ensure the rules are correct for all possible inputs ■ Validation using dmnCheck ■ Schema based Query/Result Objects Becoming full type safe, generate code ■ Support complex input objects currently limited to primitives ■ Caching do not recalculate when nothing changed ■ Distributed Systems event driven architecture/axon ■ Simulation How would the system behavior change? ■ Auditing/Cockpit better tracing/tracking of decision evaluations Roadmap Documentation, Documentation, Documentation Buildtime Runtime
  • 42. https://github.com/davidibl/dmnmgr-server Have a look at … dmn-check ■ DMN File validation  Duplicate rules  Conflicting rules  Shadowed rules  Types of the expressions  Correct use of enumerations  Correctly connected requirement graphs https://github.com/red6/dmn-check ■ Camunda Modeler Extension  Define input/output via OpenAPI  Git repo as DMN store  Validation (using dmn-check)  Simulation  Client/Server architecture dmnmgr

Editor's Notes

  1. Disclaymer, no actual steroids used in this talk, but a lot of coffee 3 big questions: Who is speaking, What is DMN and what is this all about?
  2. probably seen me here before, hattrick 3 strikes in a row, did some things in the past, worked on some extensions yopu might know fanboy since fox/6.4 did some stuff ... Wonderful company, 80/20, Hackday every week I have 100 ideas per day, 99 are crap, 1 sticks, so I play around and if I think: This could actually work! I answer the call for paper … and here I am. This year it was tough Practinioner, I need a running example, so there will be code
  3. Normally now I would ask who of you is using DMN to pretend I can shift the weights in my presentation to adopt the background you have Today I can not see you … so I assume that if you are watching a talk „DMN on Steroids 2.0, to decision tables and beyond“ you are familiar with the basics. I will just cover the relevant parts for what we will discuss later. Standard DMN is not owned by a certain enterprise but by an institution (OMG), which is already established through other world-wide standards, e.g., BPMN and UML. The DMN standard is supported by several software products; you are less dependent on any particular vendor’s products. Direct Execution In DMN, decisions can be modeled and executed using the same language. Business analysts can model the rules that lead to a decision in easy to read tables, and those tables can be executed directly by a decision engine (like Camunda). This minimizes the risk of misunderstandings between business analysts and developers, and it even allows rapid changes in production. Experience DMN as a standard is young, but it was developed by people having decades of experience with business rule management. Even though, the standard does not dictate any special implementation patterns, allowing for more modern and lightweight implementations than traditional business rule engines.
  4. Evaluation: Backend Service provides values for all input columns, result contains all output columns Result Structure depends on Hitpolicy FEEL: friendly enough expression language
  5. This is a decision graph Good news: we dont need those ... and you already now this Evaluation: Backend Service must provide data for all required inputs of all tables, except those where output->input are linked Result is the result of the effective result table (last in line) The round-cornered boxes are „input data“ … they are like the datasources in BPMN: use them if they make you feel better … the sharp edge cornered box is a „knowledge source“
  6. Flexibility: DMN is to BPMN what BPMN is to code: you want faster changes, interact with running system. So „someone“ is changing the behavior of your system, and especially in a dev ops world, for me as a developer that means: Find someone to blame! “decisions“ was chosen because it sounds more positive than „rules“ … to me that is like speaking about „challenges“ instead of „problems“ So this might have been the last slide where I really concentrate on not saying „rules“ … from now on „rules“ refers to decisions …
  7. There are so many talks out there already ... why this one. I have, as you will see, a long history with DMN. I am using it for 5 years now and am a big fan. BUT. Better is natural enemy of good … just to be fair: camunda did a great job, I love what we can do, and if camunda devs are watching: let‘s discuss this afterwards
  8. Talk „DMN on steroids“, 2017 Torben Rasche, Stefan Becke Skill based routing, Workforce Management Numbers are guesses based on fading memories, probably more today (2 million calls per day)
  9. Talk „Mastering debt recovery processes“ CamundaCon 2018 Karsten Lehmann Case activities are „possible“ (enabled) if conditions are met, these are evaluated by DMN And this is how I came up with …
  10. No special order … and some are quite obvious There are probably more than 5, but 3,5 7 always sounds good in an talk 1st rule: do not talk about ee-dmn Enterprise DMN: non trivial, high dynamic, many executions Hypothesis (to hard to pronounce): we might argue about them, my personal view … and not all of them are used in my project right now … but most of the time I wish they were
  11. Beautiful: We can discuss how rules work The example is simple and easy to understand But still: way more than „hello world“
  12. As mentioned before: a backend service collects the values for all input data. If the service already resolves the rule, there is nothing left for the decision table to do. Dont hide rules! -> by applying recusrsion, every dmn could be condensed to one cell …
  13. Better: just provide the raw data, let the dmn engine decide
  14. Friendly Enough Expression Language
  15. GROOVY*: This is NOT groovy … thats just some code I made up that should be as ugly as possible!
  16. Asterisk: we come to that later
  17. This might suprise you, because we say the complete oposite when it comes to BPMN
  18. Part of the codebase: I (the developer) own it, I will not release it, until my other tasks are finished and the pipeline is green
  19. This was discussed in the unconference slot on Wednesday a lot enter cockpit - or use modeler change data deploy play with fire: campfire, cozy, stories, Bob Dylan songs, so why bother
  20. The order is important (HitPolicy First) „or“ in Saudia Arabia For USA, the state is relevant And this is a really small example. And only for age of maturity, not even „can vote“, „can buy alcohol“, „can drive motorcycles“ … And it is wrong … If you are from Indonesia, and below
  21. we started of with one key benefit: read/write/business/it alignment non-trivial: does not fit on one screen in this case: write code that parses wikipedia and creates a table
  22. copied from camunda offical docs ... don't like
  23. Another way to maka non-trivial dmn trivial Aka Separate concerns something that we developers should be used to.
  24. question is sell product two aspects split tables execute as one rule
  25. process: instead of 1 DMN, you get 3 files: 2 DMNs and ond BPMN
  26. Is there copy&paste in the DMN modeler? Machines can
  27. bonus: time to live, delete from history testing ... well , do not get me started
  28. Enough chit chat Show me the code!
  29. Enough chit chat Show me the code!
  30. caching: pure functions (some limitations: time based and history)
  31. This was it, before we go, if you are interested in these topics, make sure to check out Today: Dmnmgr: Davids talk Business Rules at a Glance Business Architecture Track, 16:30 (half past 4)