Blog Posts Case Management Process Management Process Modeling

Choices in Modeling DMN

Blog: Collaborative Planning & Social Business

I was recently asked to do some decision modeling in DMN. This is an update on the tools that are available as I experienced them today.

Background

From 2017 thru 2020 I was the leader of the DMN “Technical Compatibility Kit” which has the goal of designing a set of tests that all vendors with DMN capabilities can then run to demonstrate their compatibility to the standard. I believe a standard with out set of standard tests will never obtain consistency of implementation. That is the purpose of a standard, and so critical. I led the group until 2020 when I handed the chair over to the very capable Matteo Mortari of RedHat.

I was asked to so some demonstration modeling and did a search to find the latest available tool that I could find without spending any money. I suppose that is a limitation, but I didn’t have money to spend on it, and it was after all just a demonstration.

TrisoTech DMN Modeler

The first trial was a Trisotech where they offer cloud-based modeling of DMN, CMMN, and BPMN, what they call the triple crown. I went there because Bruce Silver, who has the best books on the topic, recommends Trisotech. Trisotech was also a strong supporter of the DMN TCK.

You are able to sign up for a 7-day free trial. The only thing I tried was the DMN modeler. I was surprised that I was not able to test the logic of the decision model. This is actually pretty important. The DMN modeler will validate the structure of the model, and possibly the syntax of the FEEL expressions, but without being able to test the logic you have no real idea if the FEEL expression is doing exactly what you expect it to do. I was told that testing the logic required a full license to the automation engine which is logically not part of the trial package.

I must mention that of all the modeling tools I used, the Trisotech one was by far the easiest to use, and had the best usability. The visual appeal is good. As you edit expressions you are guided into picking entities that are relevant for that context. I was pleased to see that inputs are linked in such a way that input properties can be set on the input icon, or in the decision logic, and everything is properly reflected in both directions.

Trisotech includes some advanced modeling capabilities, such as conditional box expressions which I did not see in any other. I really had no problem modeling things, but the inability to test the correctness of logic was a real limitation. Plus when it timed out in 7 days I felt stranded. There is no information on the site about how to get a single-person low volume license, you must “contact sales” which was more effort than I was willing to commit.

Camunda

Camunda was also a big supporter of the DMN TCK, so I tried them next. The huge example of Camunda is that since they are open source, you can just download and run the executable. No limitations. I had no problem installing and getting it running.

Camunda takes a pragmatic approach to DMN: they will implement as much of the standard as they get requests from customers to support. They make no commitment to implement the entire standard, but at the same time there is no real reason to implement parts of the standard that no real customer has asked for. Decision tables are supported. But a “context” is missing which is a pretty useful structure composed of a list of boxed expressions. The user interface is often quite a challenge. Worth mentioning that Camunda also support “bpmn.io” which is an open source graphical editor that you can embed in your own application which is pretty awesome.

I found a Camunda DMN simulation site at (https://consulting.camunda.com/dmn-simulator/) which has quite a nice UI for entering the input values and seeing the results. It shows the diagram, and even indicates which rules in the decision table were used to produce the answer. It is free to use.

Overall I found Camunda too limited for the demonstration I needed to do. They don’t support “number” as a type which is a decimal exponential number which is critical to financial applications. This type is known as BigDecimal in Java. Camunda only supports integer, which is not even mentioned in the spec, and a pretty big limitation. Also, the more useful features of FEEL involve the handling of lists, and I could not find any way to do that in Camunda. Overall, Camunda makes a reasonable tool for use in an application if you simply want to string together a set of decision tables, and they have at least made a good attempt to support what they do in a standard way.

Red Hat DROOLS Workbench

I was already familiar with Red Hat for their support of the DMN TCK, and the brilliant work of Edson Tirelli in implementing what I am sure is the best implementation of the execution of the standard. At Fujitsu I had leveraged DROOLS for rules support. In recent years Red Had has added DMN modeling to the Business Central suite. It was quick and easy to run the containerized version of workbench-showcase in Docker on my computer without any problem. It is set up to support collaborative team work, and so there is some overhead in structuring the artifacts in an acceptable way.

The DMN editor was fine. I found it easier to use than Camunda, but still much rougher than the Trisotech. Once I found the properties panel on the right, things got a lot easier. There is always a learning curve, but eventually I was able to do all the models.

The workbench also has some DMN test capability however it was not really working. I could enter a table of simple input values and output values. I could not just enter the input and see what the output was. If the output value placed there was incorrect, it would mark it as incorrect, however it did not show expected and actual values received. This was surprising because I followed a video demonstration, and on the video it had that information in a pop-up, but I could not make it appear. It refused to work on anything that had a table or an array at the top level. While it work on some cases, I was not getting it to work on any of the cases that I had to demonstrate.

KIE Sandbox

This is design and test environment (https://sandbox.kie.org/) put together by the Kie Community described as “a home for leading Open Source projects that play a role in delivering solutions around Business Automation and Artificial Intelligence in the Cloud.” The DMN editor available there is the same one you find in the DROOL Business Central workbench, which as mentioned above is adequate: it will model everything I needed to do.

What is particularly impressive is the DMN test capability. To get it to run, you need to download and start the KIE Sandbox Extended Services which ran without a hitch. The web UI automatically noticed that the engine was installed. Then, it would automatically generate forms for inputting the data. Most impressive was that it can handle structured data records and arrays, even arrays of structured records. The output appears in the next column over. The complex table and list commands all ran. It is hard for me to really express how great it was after days of trying to get various combinations to work, to find an environment where everything ran without a problem.

So, if you want practical experience with DMN models and running the models, go right to KIE Sandbox. It works.

Integration

All of these allow for export and import of standard DMN model files, however it is worth mentioning that this almost never worked. I hope to do a little more investigation and report more details soon. In some cases models simply would not import complaining about syntax errors. One of the tools generated XML that was not even valid XML according to a standard XML schema testing site. I was able to import some models after hand-editing the XML to make it work, however you should not have to do this. In other cases, the file would import, but large chunks of it was missing, simply dropped without warning because the receiving engine did not support something. In some cases transferring a file from one to another cause duplication of some parts of the model, putting extra elements on the graph. I looked into the XML files to see that on some occasions the very same structures were represented in quite different ways. Terminology also varies, along with details in layout, etc. There were enough problems that I strongly warn that independent testing is needed, and would recommend that anyone standardizing on DMN go the extra step to assure that a particular style of encoding is assured.

In Summary:

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/choices-in-modeling-dmn/?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

×