camunda-community-hub / camunda-dmn-tester

Project to test (Camunda)-DMN Tables.
MIT License
21 stars 3 forks source link
camunda dmn dmn-tables dmn-tester scala

Community Extension Lifecycle: Incubating Compatible with: Camunda Platform 7 Compatible with: Camunda Platform 8 Educational Tooling Maven Central GitHub repo size Docker Pulls

Camunda DMN Table Tester

A little DMN Table tester with the following Goals:

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

Version

I work at a redesign at the moment and published it > Version > 0.15.*.

Not all features are ready in the UI (mostly the test cases). So if you need them stay on 0.14.0.

Usage

I wrote two blog article that explains how you can use it:

And there is a Recording from Camunda Community Summit:

Test Configuration

Config Dialog 1 Test Mode

You can configure a DMN Table Test as:

2 Decision Id

The id of your table - be aware this is not the name

3 Path of the DMN

This path depends on your Docker Image (check runDmnTester.sh).

Example: -v $(pwd)/dmns:/opt/docker/dmns \

4 Test Inputs

Add the following for each Input:

5 Test Variables

You can define Variables you use in your Rules. Usually one value is enough.

Technologies

This projects builds on cool Open Source Projects. So my thanks go to:

Shared

Client

Server

Start Script

This starts the Web Server on Port 8883.

This copies the client assets to the classpath of the server. So make sure you run npm run build before.

Or use the client as described in the next chapter.

Client

In the sbt console: ~fastLinkJS

This creates the Javascript file from the Scala classes on the fly with every change.

In the terminal: npm run dev

This will watch all your changes in the client and automatically refresh your Browser Session. This uses Vite.

Open in the Browser http://localhost:5173.

Releasing

Just run amm ./publish-release.sc VERSION.

Due to problems with the "org.xerial.sbt" % "sbt-sonatype" Plugin you have to release manually:

if you do not see any of the buttons or repository hit the refresh Button.

Local publish

Just run amm ./publish-release.sc VERSION-SNAPSHOT.

For now as soon as you publish a SNAPSHOT - it is always published locally.

Docker

There are 2 Docker Images:

  1. The DMN Tester App:

    sbt server/docker:publishLocal creates a Docker Image - see also next chapter.

  2. The Unit Test Creator: See its README.md

Try it out

There are Docker Images you can use with an example in the demo directory.

cd demo

See the according README