Contents

Preface to the Third Edition. vii

Part I Guide to Decision Modeling. 1

  1. What Is DMN?. 3

    • DMN by Example. 4
    • Model-Based Decision Automation. 13
  2. DMN Elements. 23

    • Decision Requirements Diagrams 23
    • Metamodel and Schema. 25
    • Boxed Expressions 25
    • FEEL. 31
    • Essential Characteristics 36
  3. Decision Requirements. 37

    • Decision Requirements Diagram.. 38
    • Modeling Decision Requirements 39
  4. Decision Tables. 49

    • Decision Table Basics 49
    • Simple Unary Tests 53
    • Decision Table Hit Policy. 53
    • Decision Table Analysis 66
  5. Data Modeling and Reuse. 77

    • DMN Data. 77
    • FEEL, XML, and JSON Data. 82
    • Null 87
    • Controlled Business Vocabulary. 88
    • SDMN.. 93
  6. Literal Expressions. 97

    • Basic concepts 97
    • Literal Expression Elements 98
    • FEEL String Functions 103
    • FEEL Number Functions 104
    • Combining Functions 105
    • Formatting Numbers 106
    • Generalized Unary Tests 107
    • V-FEEL. 108
  7. Business Knowledge Models. 109

    • BKM Definition and Invocation. 109
    • Benefits of a BKM.. 113
    • Calling External Functions 114
    • Libraries of Reusable Logic. 114
  8. Contexts. 117

    • Context with Final Result Box Expression. 117
    • Context with No Final Result Box Expression. 122
    • Context as a Datatype. 124
    • FEEL Context Functions 124
  9. Decision Services. 127

    • Why Define a Decision Service. 127
    • Decision Service vs BKM.. 128
    • One Model, Many Services 129
    • Creating a Decision Service. 130
    • Visualizing Execution Steps 136
  10. Calendar Arithmetic. 141

    • Date and Time Components 142
    • Durations 143
    • Date-Time Arithmetic. 144
    • Temporal Logic. 148
  11. Lists and Tables. 151

    • What Is a List?. 151
    • Creating a List. 152
    • FEEL List Functions 156
    • Filter Expressions 158
    • Lookup Tables 161
    • Table Joins 163
    • Iteration. 165
    • Testing All Members of a List. 172
    • List Membership and Set Operations 172
    • Functions with Function Parameters 174
  12. Data Validation. 177

    • Mapping Submitted Values to FEEL. 177
    • Recognizing Invalid Data. 177
    • Avoiding Runtime Errors in the Validation Logic. 180
    • Data Validation Methods 181
  13. Orchestrating DMN.. 187

    • BPMN Routing Decisions 187
    • Decision Service Orchestration. 196
    • Low-Code Business Automation. 197

Part II DMN Cookbook. 199

  1. About the DMN Cookbook. 201

    • FEEL: More Powerful and Business-Friendly than Power FX. 201
    • Recursion. 203
  2. String Recipes. 205

    • Basic Concatenation. 205
    • Casting to a String. 206
    • Concatenation with Null Data. 207
    • Parsing a String. 208
    • Convert Delimited Text to Table. 210
    • String Join. 212
    • String Containment. 213
    • Formatted Strings 214
    • Regular Expressions 215
    • Matching a Regular Expression. 217
    • Replacing a Regular Expression with a String. 217
  3. Calendar Arithmetic Recipes. 219

    • Extract Date and Time Components 219
    • Create Value from Components 220
    • Durations 220
    • Business Calendar. 222
  4. List and Table Recipes. 225

    • Functions that Manipulate Table Rows 225
    • Iteration Over Item Index – MACD. 226
    • Double Iteration. 231
    • Complex Sort. 235
  5. Math Recipes. 239

    • Rounding a Number. 239
    • Number List Functions 240
    • Built-In Math Functions 241
    • api.mathjs.org Service. 241
    • Java Math Library. 243
    • Factorial 244
    • Taylor Series 244
    • Interpolation. 246
    • Square Root – Iterative Solution. 249
    • Newton-Raphson Method. 249
  6. Machine Learning Recipes. 253

    • Correlation. 253
    • Linear Regression – Analytic Solution. 254
    • Linear Regression Using Gradient Descent. 256
    • Churn Prediction with PMML. 260
  7. Data Validation Recipes. 265

    • Contexts for Extraction and Rules 265

Index. 279

About the Author. 285