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.
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 was also a big supporter of the DMN TCK, so I tried them next. Since they are open source, you can just download and run the executable, which is a big advantage. 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 it is a waste to implement parts of the standard that no real customer has asked for. Decision tables are supported. But many other structures missing, including “context” which is a pretty useful structure composed of a list of boxed expressions. The minimmalist user interface is often quite a challenge. Camunda is behind “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.
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.
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.
- Trisotech: best UI, best & most powerful modeling, but no testing environment
- Camunda: works fine for their subset implemented
- Red Hat: best execution environment, fine modeling, but the test capability appears to be not actively maintained.
- KIE Sandbox: best all around tool for a DMN practitioner, and built on RedHat so certainly compatible with that.