Getting started

Decision Toolkit provides a set of examples ready to play with.

To install examples in examples directory, enter:

$ dsntk exs examples

For a more detailed description of exs command, please refer to Saving examples.

Evaluate example FEEL expression

$ cd ./examples/e1
$ dsntk efe e1.ctx e1.feel
3

For a more detailed description of efe command, please refer to Evaluating FEEL expressions.

Evaluate example DMN model

$ cd ./examples/e2
$ dsntk edm e2.ctx e2.dmn -i "Greeting Message"
"Hello John Doe"

For a more detailed description of edm command, please refer to Evaluating DMN models.

Evaluate example decision table

$ cd ./examples/e3
$ dsntk edt e3.ctx e3.dtb
0.15

For a more detailed description of edt command, please refer to Evaluating decision tables.

Run Decision Toolkit as a service

$ cd ./examples/e2
$ dsntk srv -v -H 127.0.0.1 -D .
Found 1 model.
Loaded 1 model.
Deployed 1 invocable.

Deployed invocables:
  io/dsntk/2_0001/compliance-level-2-test-0001/Greeting%20Message

dsntk 127.0.0.1:22022

Switch to another terminal and enter:

$ curl -s -d "{\"Full Name\":\"John Doe\"}" \
       -H "Content-Type: application/json" \
       -X POST http://127.0.0.1:22022/evaluate/io/dsntk/2_0001/compliance-level-2-test-0001/Greeting%20Message
{"data":"Hello John Doe"}

For a more detailed description of srv command, please refer to Serving DMN models.