Search…
Welcome to DecisionRules
API
API Introduction
API Keys
Rule Solver API
Rule Flow Solver API
Management API
Datacenters & Locations
Apache Kafka Solver API
Tutorials
Create Simple Decision Table
Create Simple Decision Tree
Create Simple Scripting Rule
Create Simple Rule Flow
Endpoint Settings
Decision tables
Decision Tables Introduction
Table Designer
Input & Output JSON Model
Binding to Model
Supported Data Types
Operators
Advanced Functions
Export & Import Decision Table
Manage Decision Tables in Excel / Google Sheets
Manage Decision Tables
Table Operations
Decision Trees
Decision Trees Introduction
Decision Tree Designer
Import and Export Decision Trees
Scripting Rules
Use Rule Variables in Scripting Rules
Call Embedded Rules in Scripting Rules
Import & Export Scripting Rules
Rule Flow
Rule Flow Designer
Rule Flow Mapping
Rule States in Rule Flow
Warnings & Errors
Rule Flow Limits
Import & Export RuleFlow
Other
Execution Strategy
Rule State
Rule Versioning
Favorite Rules
Rule Variables
Rule Tags
Single Sign-On (SSO)
Event timeline
Teamwork
Dashboard
Spaces
Manage Spaces
Space Members
Share Rules Between Spaces
Advanced Permissions
Test Bench
Rule Test Bench
Simple Test Bench
SDK and Frameworks
Languages / Frameworks
Business Intelligence
Connecting from Power BI
Billing
Invoices & Billing
Change Product Plan
Billing Information
On-Premise / Docker
Environmental Variables
Setup Single Sign-On (SSO)
Docker Showcase App
DecisionRules Application
AWS Setup
Microsoft Azure Setup
Kubernetes
Terms & Conditions
Terms and Conditions
Privacy Policy
Service Level Agreement
Roadmap 🚲 🗺️
Release Notes
Powered By
GitBook
Rule Test Bench
Test Bench is used to test rules in Dashboard.
Testing Rules
There are some steps to test your rules:
1.
Select Rule & Version
2.
Select API Key
3.
Fill Request Body
4.
Choose execution strategy
5.
Click on Solve! button
6.
Read Response
Select Rule & Version
1.
The First step is to select the
rule
of what you want to test.
2.
After selecting the rule, there are options to set a
version
of the rule. Otherwise, the last version of the rule will be used.
Select API Key
The Next step is to select some of the created API keys.
If no API key has been created, please follow
Create API Keys
instructions before starting Test Bench.
Fill Request Body
The Next step is to fill the
request body
.
Example Request Body simple:
1
{
2
"delivery"
:
{
3
"tariff"
:
"basic"
,
4
"distance"
:
50
5
},
6
"package"
:
{
7
"weight"
:
5
8
}
9
}
Copied!
Example Request Body bulk:
Decision Table example:
Example Input:
1
[
2
{
3
"product"
:
{
4
"id"
:
"P1"
,
5
"price"
:
400
6
},
7
"paymentMethod"
:
{
8
"debitCard"
:
true
,
9
"creditCard"
:
false
,
10
"cash"
:
{}
11
}
12
},
13
{
14
"product"
:
{
15
"id"
:
"P2"
,
16
"price"
:
300
17
},
18
"paymentMethod"
:
{
19
"debitCard"
:
true
,
20
"creditCard"
:
{},
21
"cash"
:
{}
22
}
23
}
24
]
Copied!
More examples and information are in
Rule Solver
.
Choose execution strategy
The next step is to choose a strategy, that you want to use.
Available in decision tables only.
All necessary information and differences about
execution strategy
Solve!
The Last step is to click on
button.
After clicking on this button, your specified data (rule, request body, etc) is sent to
Rule Solver
.
Response
After solving, a response will show actual data.
Example of Response simple:
1
[
2
{
3
"car"
:
{
4
"price"
:
666666
,
5
"seats"
:
{},
6
"discount"
:
{
7
"low"
:
2
,
8
"high"
:
33
9
}
10
}
11
}
12
]
Copied!
Example of Response bulk:
1
[
2
[
3
{
4
"suplier"
:
"Amazon"
,
5
"amount"
:
400
6
}
7
],
8
[
9
{
10
"suplier"
:
"Lenovo"
,
11
"amount"
:
300
12
}
13
]
14
]
Copied!
Example and more information are in
Rule Solver
.
Maximize Test Bench window
For a larger view of the Test Bench, you can use the maximize (
) button in the right corner.
Library Usage example
This component shows how to call
Rule Solver
in
libraries.
It is possible to choose one compatible library. After that, the example will be shown in the code block. You can copy it or simply click on
button.
Example of Libary usage:
The INPUT data must be wrapped in -d
'{"data":{...}}'
- this is the default one.
1
curl https
://
test
.
api
.
decisionrules
.
io
/
rule
/
solve
/
fc70b265
-
c0df
-
5989
-
7dd9
-
17ed527a15ec
/
1
2
-
X
POST
-
H
"Content-Type: application/json"
3
-
H
"Authorization: Bearer zgYtNXd8CBx4KFlO-9flmw-sLE_OUi3mKIeA4GINTIVVHe1GK1CFNTXgV4To-goZ"
4
-
d
'{"data":{"Size":{"Height":0,"Length":0,"Depth":0},"Distance":0,"Insurance":{"Class":1,"Value":0}}}'
Copied!
OR
The INPUT data must be wrapped in -d
"{\"data\":{...}}"
if you are using \ (backslash)
1
curl https
://
test
.
api
.
decisionrules
.
io
/
rule
/
solve
/
fc70b265
-
c0df
-
5989
-
7dd9
-
17ed527a15ec
/
1
2
-
X
POST
-
H
"Content-Type: application/json"
3
-
H
"Authorization: Bearer zgYtNXd8CBx4KFlO-9flmw-sLE_OUi3mKIeA4GINTIVVHe1GK1CFNTXgV4To-goZ"
4
-
d
'{\"data\":{\"Size\":{\"Height\":0,\"Length\":0,\"Depth\":0},\"Distance\":0,\"Insurance\":{\"Class\":1,\"Value\":0}}}'
Copied!
For this component, you need to have at least one decision table and
API key
.
Teamwork - Previous
Advanced Permissions
Next - Test Bench
Simple Test Bench
Last modified
27d ago
Copy link
Contents
Testing Rules
Select Rule & Version
Select API Key
Fill Request Body
Choose execution strategy
Solve!
Response
Maximize Test Bench window
Library Usage example
OR