DSNTK | Java RPC server
DMN™ specification defines functionality that allows to call external functions written in Java. Details can be found in the document Decision Model and Notation Version 1.4 on pages 117-118 (externally-defined functions).
While Decision Toolkit (DSNTK) is written in Rust, then calling Java functions requires an RPC (Remote Procedure Call) server. This project is a Java implementation of such server.
Java RPC server can be downloaded from releases built from source or run in Docker container.
- Clone this repository.
- Install Java 17 or newer.
- Install Maven.
- Build the server:
$ mvn package
The server-0.0.1.jar can be found in ./target directory
$ java -jar server-0.0.1.jar
Docker container can be built and run using prepared script file:
$ ./container.sh
After building, the new container is started and ready to accept requests, try:
$ curl http://127.0.0.1:22023/api/rest/v1/system/info
The output should look like this:
{"data": {"name": "Java RPC server for Decision Toolkit","version": "0.0.1"}}
-
GET http://127.0.0.1:22023/api/rest/v1/system/info
Utility endpoint for checking the connectivity with the running server.
-
POST http://127.0.0.1:22023/api/rest/v1/rpc/evaluate
This endpoint is used directly by Decision Toolkit to evaluate Java functions.
Licensed under either of
- MIT license (see LICENSE-MIT) or
- Apache License, Version 2.0 (see LICENSE and NOTICE)
at your option.
Any contributions are greatly appreciated. If you would like to get involved, please don't hesitate to reach out to us. All contributions intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.