dsntk | ÐecisionToolkit
The DMN™ specification defines functionality that allows calling externally defined functions, including those implemented in Java. More details can be found in the official specification under the chapter "Externally-defined functions". Since ÐecisionToolkit is implemented in Rust, invoking Java functions requires a Remote Procedure Call (RPC) server. This project provides a Java implementation of such an RPC server.
The RPC server for Java can be downloaded from releases, built from source or run in Docker container.
- Install Java 21.
- Install Maven.
- Clone this repository.
- Build the server:
mvn packageThe server-1.0.0.jar can be found in ./target directory
java -jar server-1.0.0.jarDocker container can be built and run using prepared script file:
./scripts/container.shAfter building, the new container is started and ready to accept requests. Try:
curl http://127.0.0.1:22023/api/rest/v1/system/infoThe output should look like this:
{"data":{"name":"Java RPC server for ÐecisionToolkit","version":"1.0.0"}}To get a pretty-printed JSON, try:
curl -s http://127.0.0.1:22023/api/rest/v1/system/info | jqExpected output:
{
"data": {
"name": "Java RPC server for ÐecisionToolkit",
"version": "1.0.0"
}
}-
GET http://127.0.0.1:22023/api/rest/v1/system/info
Utility endpoint for verifying connectivity with the running server.
-
POST http://127.0.0.1:22023/api/rest/v1/rpc/evaluate
Endpoint directly used by ÐecisionToolkit to evaluate Java functions in compliance with the DMN™ specification.
Licensed under either of
- MIT license (see LICENSE-MIT) or
- Apache License, Version 2.0 (see LICENSE and NOTICE)
at your option.
Any contributions to dsntk-java-server are greatly appreciated. All contributions intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.