Blog Posts BPMN DMN

DMN Demystified, Part 5. Key Element 4: Boxed Expressions

Blog: Method & Style (Bruce Silver)

Last time I mentioned that FEEL is just an expression language not a programming language.  It does not have statements.  It cannot create variables.  But, of course, you need those to define executable decision logic!  So where do they come from?

What makes DMN business-friendly is that variables and their value expressions are created graphically, in diagrams and tables.  We’ve already seen how each decision node in the DRD defines a variable of the same name, and how a decision table provides its value.  But decision logic is more than decision tables.  It’s also literal expressions and function definitions and data mappings.  Those are modeled graphically, too.

DMN provides a simple tabular format for all of those things, called boxed expressions.  A boxed expression is basically a two-column table.  The first column is the name of a variable or a component of a structured variable.  The second column is its value, a FEEL expression.  That’s it: name, value.  Pretty simple.  The rows of the table, from top to bottom, act like the  statements in a programming language.  Here, for example, is the boxed expression for a BKM, Installment calculation.  Because a BKM represents a function definition, the first row of the boxed expression lists its parameters: Product Type, Rate, Term, Amount.  Then come the name/value pairs:  A new variable Monthly Fee takes its value from the FEEL expression in the right column.  A second new variable, Monthly Repayment, takes its value from the right column as well, here defined as the invocation of another function called PMT, defined elsewhere.  The last row, called the final result box, is another FEEL expression for the output value of the BKM, a simple sum of the new new variables.

boxedExp1

Required monthly installment, the decision that invokes Installment calculation, maps its inputs to the BKM parameters using the same boxed expression format:

boxedExp2

The names of the four parameters are in the left column.  The value expressions for each, here just a component of the input data element Requested product, are in the right column.

In essence, the combination of a diagram – the DRD – and a bunch of 2-column tables defines the “programming language” of DMN, accessible to business people but – in principle – executable on a decision engine.  I say “in principle” because, like FEEL, boxed expressions have not been adopted by first-generation DMN tools.  And unlike FEEL, this isn’t even hard to do!  Boxed expressions should be considered an essential part of the DMN notation.

The post DMN Demystified, Part 5. Key Element 4: Boxed Expressions appeared first on Method and Style.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/dmn-demystified-part-5-key-element-4-boxed-expressions/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×