Tutorial How to test a decision model - Gnorion/BizVR GitHub Wiki
Tutorial How to test a decision model
Your decision currently looks like this:
While this correctly captures the decision and its component decision table, it is not yet executable.
In order to make it executable there are a number of additional steps:
- Define the decision table as a function with input and output arguments
- Define the inputs
- Define the output (as an invocation of the decision table function)
Here are the detailed steps
1. Click on the decision table and change its name to this:
Also make sure the values are in single quotes like this:
And modify the action line to return the result. Make sure to save it
Now edit the inputs and outputs to look like this:
2. To do this, exit to this screen
3. Click on this symbol to edit the decision meta data
4.and then select the Input/Output tab
4. Click + to add inputs and outputs and enter the following
5. Save and return to the decision diagram
Click on the symbol with nine dots (execution)
You will see this screen:
Enter the following json for your input values (or just copy/paste).
{ "color":"red","size":"small","shape":"square" }
And then click the little gear symbol to execute the rules.
You should see this (if you don't, carefully check the spelling and punctuation) :