Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Getting started

ÐecisionToolkit provides a set of examples ready to play with.

To install examples in examples directory, run:

dsntk exs examples

For more details, refer to Saving examples.

Evaluate example FEEL expression

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

Output:

3

For more details, refer to Evaluating FEEL expressions.

Evaluate example DMN model

cd examples/e2
dsntk edm e2.ctx e2.dmn -i "Greeting Message"

Output:

"Hello John Doe"

For more details, refer to Evaluating DMN models.

Evaluate example decision table

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

Output:

0.15

For more details, refer to Evaluating decision tables.

Serve example DMN model

cd examples/e2
dsntk srv -v -H 127.0.0.1 -D .

Output:

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

Open a new terminal window and run:

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

Output:

{"data":"Hello John Doe"}

For more details, refer to Serving DMN models.