Jump to: navigation, search

Query Decision Table Body

Method

GET

Syntax

 
/grs/v1/tenant/{tenantId}/package/{packageId}/decisiontablebody/{ruleId}

Request Body

N/A

Response Body

 
{
"ruleId": "2e11aaa7-12c4-4cf2-8a74-4dbfcf8ed76e",
"ruleType": "DECISION_TABLE",
"extRuleId": "DT-208",
"name": "test dt 2",
"description": "",
"phase": "1st",
"calendarId":"Calendar_117",
"nodeId": "pkg",
"salience": 100000,
"bcLevel": 1,
"locked": false,
"lockOwner": null,
"dateEffective": null,
"dateExpired": null,
"pendingSnapshot": true,
"conditions": [
{
"header": "Debt is less than",
"sentence": "Debt is less than {debt}",
"factType": "Debt is less than {debt}",
"factField": null,
"constraintValueType": 5,
"segmentList": ["\"{debt}\""]
},
{
"header": "Age is between",
"sentence": "Age is between {age_low} and {age_high}",
"factType": "Age is between {age_low} and {age_high}",
"factField": null,
"constraintValueType": 5,
"segmentList": [
"\"{age_low}\"",
" and ",
"\"{age_high}\""
]
}
],
"actions": [
{
"header": "Decision is",
"sentence": "Decision is \"{decision}\"",
"segmentList": ["\"{decision}\""]
},
{
"header": "Stop processing",
"sentence": "Stop processing",
"segmentList": ["Stop processing"]
}
],
"data": [ [
null,
"DTR-209",
"",
"33333",
"22",
"and",
"23",
"OK",
"Stop processing"
]]
}

HTTP Status Codes

  • 200 OK—Response body provided
  • 401 Unauthorized—APIToken not valid
  • 403 Forbidden—User does not have permission for the specified
    tenant ID, or does not have the correct permission for this operation.
  • 404 Not Found—could not find specified rule ID.
  • 503 —Service Unavailable

Notes

User must have RULE_VIEW permission Optional Parameter:

  • &version=<xxx> (specifies an earlier version of the rule)

Description of the results: This query will return the condition and action columns to be shown in a decision table, along with the substitution data that makes up each row. For both "condition" and "actions", the following is returned:

  • sentence—The original sentence from the template: Health is "{health}"
  • segmentList—The original parameters used (eg, "{age}") and any intervening text separated in segments.

Example: [ "Health is", "{health}" ] Note: Use Query Parameters to fetch the type of each parameter (eg, "age", "name", etc), any constraints and any drop-down values. This information is not repeated for each condition/action but can be queried separately and applied to control what the user is able to type for each value. The actual decision table data is returned as a two-dimensional array representing the rows and columns of the decision table. The first column is always "NULL" as it represents the generated drools ID and is not modifiable by the user.

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on May 16, 2017, at 00:20.