At LV 1871 one of the most important strategical goals is the enabling of business specialists to participate in software development.
The use of tools providing a convenient way to express business rules in an excelish way is a mission-critical component on the way to a fully automated, digital and agile insurance company.
Readable, configurable business rules are mission critical in a highly automatable Business.
The DMN Standard is a great way to fulfil this requirement as a part of any software component.
The decision model and notation standard define an XML-language to express business rules. The visual design and definition of business rules are supported by a broad range of modellers
The execution of business rules is supported by different execution engines.
These engines typically provide convenient APIs to integrate business decisions with any software.
At LV 1871 we are using the Camunda engine to execute business decisions as it is our default engine in terms of business process automation.
With the use of DMN, we can integrate the business development process deeply with the software development process, materializing product changes.
As a result of digitalization more and more changes related to customer services or product definition results in changes to IT-Systems. Business specialists need to be enabled to implement changes to IT-Systems themself.
As the next level of crossfunctional teams, business specialists and software specialists can work side by side on software projects introducing their special knowledge about the concrete domain.
As we provide mighty functionality to business specialists, the most important requirement to the configuration system itself is, that it integrates with common development processes like CI/CD and automated testing.
Since the Standard DMN editors out there just provide functionality about modelling we decided to extend the Camunda DMN editor toolkit to create a modeller directly integrated into the GIT based development process. Furthermore, the extended editor should provide functionality like testing and decision simulation to ease the development of business rules.
The DMN Manager
That’s why, we introduced our DMN Manager, an IDE for DMN based applications with functionality like debugging and testing.
The core of the system is the Camunda DMN modeller toolkit on the client-side and the decision engine on the server-side.
General architecture and workflow
In general, the system consists of three components. The client-side modeller, a web service for simulation and a test driver.
The primary component is the client electron application with support for DMN modelling. The client is usable without the server-side component.
The server component provides web services to simulate, test and validate decisions.
Last but not least there is a test driver component which integrates the DMN test definitions with any ci pipeline in any Java project.
We decided to do any execution-related stuff server-side to use a real Camunda engine for execution to simulate real runtime behaviour.
The DMN Manager extends the Camunda DMN Modeler with several functionalities improving the DMN development experience. The following section names the most important functions.
- Input data-model definition
The data modelling tool provides functionality to define any kind of data structure. It is used to define the data structure of the input model for the decision.
The input data-model can also be defined by loading an Open API 3 definition (swagger).
Once, the data-model is set up, it is used to provide input forms to simulate or test decision. The data-model definition, as well as test definitions, are stored in an extra file side by side to the original DMN file. This JSON based project-file contains all information not directly related to DMN. To separate those files within Java programs they can live in their own directory as well as the original DMN file is linked by a path within the project file.
- Decision simulation
The tool embeds a UI to simulate decisions with user-defined input data. After simulating a decision, all executed decisions of a requirements graph are highlighted in the requirements graph and it is possible to debug decisions through all depending tables.
It is also possible to define any simulated decision as a persistent test. Simulation is done server-side through a web service which uses the Java Camunda decision engine.
It is possible to use any kind of rest based service which provides the given API to simulate or test decisions. After all, any decision simulation can be done by a production near engine in this way.
- DMN validation
The tool provides some basic validations for DMN. We are using the red6 dmn-check library extended by some custom validators. The client tool validates on every save or when opening a file.
The validation result is displayed in an integrated status bar. Pointing to a concrete warning or error will open the concrete decision table and mark the lines. Validation requires server component running and configured.
- Automated testing and test definition
The testing pane is used to define test cases. These are simple input-output tests. Input data and corresponding output data is defined and get compared.
Test cases are defined per table in a requirements graph, so tests for tables can be isolated in some way.
Every test case gets saved in the project file beside the original DMN. If the DMN project is part of a Java project the test driver can be used to integrate the tests with the CI process of the Java project itself. The tests get executed every time the build process is triggered. The test driver creates a test suite and failed tests can be identified.
With an All-Tests-Dialog it is possible to run all tests of one DMN-file and jump to failing tests.
- Workspace view
After opening any DMN file, the workspace view Shows up all DMN files of the current folder. Files can be switched by just clicking another one. This view also incorporates a GIT history. The GIT history shows any commit comment, the name and email of the committer as well as the commit date.
- Basic Git Support
The DMN Manager embeds basic support for GIT repositories. When a file is opened as a part of a GIT repository, the GIT support is enabled. The tool provides the following functionality:
- Cloning repositories
- Push/Pull of the current repository (Pull only fast forward)
- Commit current changes as one commit with a custom message
- Reset current changes in the workspace
- Create and checkout branch
- Checkout commit from history as a detached head
- View commit history of the current repository
- Display current repository state and branch
GIT support uses lib2git bindings and requires provisioning of ssh-keys on the settings page. The repository has to be configured well.
- Editing tools
- Search and Replace
Search and replace can be used to find rules by cell contents. The replace function is a mighty tool to edit masses of cells. It is possible to search a bunch of rules by the content of one cell and replace contents in another cell with a different search string.
- Copy and paste rules
The rules currently displayed can be copied and pasted in the same or another table. It is possible to search for some rules and copy them afterwards.
- CSV import and export
The export function can be used to export the current table without cell headers to a CSV file. Any CSV data can be imported to the current table. So DMN table contents can be edited in excel in between.
Use and Contribution
To use the DMN Manager the latest Windows build can be downloaded via GitHub releases page of the project. The client tool can be used with limited functionality without the DMN Manager service.
The service can be downloaded as a prebuild Java Spring Boot executable and started in different environments. On the client settings page, the user has to define the service URL.
As we, at LV 1871, as insurance association, deeply believe in the power of the community, this tool is open source and both projects can be checked out as source code and build with own customisations. Maybe someone wants to use another version of the Camunda decision engine on the service side or within the test driver.
Feel free to provide issues or participate in the further development of the tool.
DMN Manager Client App
This project contains a implementation of dmnjs with management functionality sorrounded. It’s target is to provide a…
DMN Manger Server Application