Camunda DMN Table Tester
A little DMN Table tester with the following Goals:
- As a developer I want to test the DMNs that I get from the Business, even not knowing the concrete rules.
- Business people can create their own tests.
- They can easily adjust the tests to the dynamic nature of DMN Tables.
This is exactly the kind of tool that as soon as I saw it, I knew it was something I was missing.
I really enjoy being able to help people especially new people with modeling DMN, so I often have people sending me models to validate.
This tool’s fundamental helpfulness comes first from being able to quickly catch some of the simple common errors, but also in the way it makes it easy for business users to explore the wide variety of possible ways in DMN that decisions can be modeled. This was in fact the original goal of DMN and this is a strong step towards narrowing the Business IT Gap for the standard.
Niall Deehan Developer Relations Camunda
I wrote two blog article that explains how you can use it:
And there is a Recording from Camunda Community Summit:
You can configure a DMN Table Test as:
- a Unit test (the inputs are not created from evaluating the depending decisions - you define them directly)
- with all its dependent Inputs (decisions like DMN Tables or Literal Expressions).
2 Decision Id
The id of your table - be aware this is not the name
- you only find it in the 'Edit DRD' Panel with the DMN Table Object selected.
3 Path of the DMN
This path depends on your Docker Image (check runDmnTester.sh).
-v $(pwd)/dmns:/opt/docker/dmns \
- This assumes your DMNs are in a folder dmns.
- So your Path would be
4 Test Inputs
Add the following for each Input:
- Key: This is what you need in your input expressions.
- Type: The Type specified.
- Values: A comma separated list of all possible inputs.
- Null Value: If it is possible that the input may be null (not required), check this box.
5 Test Variables
You can define Variables you use in your Rules. Usually one value is enough.
This projects builds on cool Open Source Projects. So my thanks go to:
Autowire is a pair of macros that allows you to perform type-safe, reflection-free RPC between Scala systems.
BooPickle is the fastest and most size efficient serialization (aka pickling) library that works on both Scala and Scala.js.
Write React apps in Scala just like you would in ES6
- Scalably Typed
- Ant Design
A design system for enterprise-level products. Create an efficient and enjoyable work experience.
- Scala DMN
An engine to execute decisions according to the DMN 1.1 specification.
Typeful, functional, streaming HTTP for Scala.
- ZIO Config
A functional, composable ZIO interface to configuration
Type-safe, composable asynchronous and concurrent programming for Scala
Ammonite lets you use the Scala language for scripting purposes: in the REPL, as scripts, as a library to use in existing projects, or as a standalone systems shell.
This starts the Web Server on Port 8883.
This copies the client assets to the classpath of the server. So make sure you run
Or use the client as described in the next chapter.
This will watch all your changes in the client and automatically refresh your Browser Session.
Open in the Browser http://localhost:8024.
amm ./publish-release.sc VERSION.
Due to problems with the
"org.xerial.sbt" % "sbt-sonatype" Plugin you have to release manually:
- check Staging Repository
- hit close Button
- hit release Button
if you do not see any of the buttons or repository hit the refresh Button.
At the moment there are 2 steps:
Build the Client (full optimization) and the Server:
There are 2 Docker Images:
The DMN Tester App:
sbt server/docker:publishLocalcreates a Docker Image - see also next chapter.
The Unit Test Creator: See its README.md
Try it out
There are Docker Images you can use with an example in the
See the according README