Introduction to RASON
About RASON Models and the RASON Server
Rason Subscriptions
Rason Web IDE
Creating and Running a Decision Flow
Defining Your Optimization Model
Defining Your Simulation Model
Performing Sensitivity Analysis
Defining Your Stochastic Optimization Model
Defining Your Data Science Model
Defining Custom Types
Defining Custom Functions
Defining Your Decision Table
Defining Contexts
Using the REST API
REST API Quick Call Endpoints
REST API Endpoints
Decision Flow REST API Endpoints
OData Endpoints
OData Service for Decision Flows
Creating Your Own Application
Using Arrays, For, Loops and Tables
Organization Accounts

"Hit Policy: Priority" using tblPolicyPriorityOrder

According to the Priority Hit Policy, if multiple rules are "hit" and multiple results are collected, only one result will be returned. The priority of the returned result is defined by the order of the output values in the header.

The tblPolicyPriorityOrder table returns a risk of disease rating of low, medium, or high based on a person's age and medical history. This table requires two inputs, age and medHistory, and returns one result, riskRating, which must be returned in the following order: low, medium, high.


{decisionTables: {
   "tblPolicyPriorityOrder": {
		inputs: ["age", "medHistory"], 
		outputs: ["riskRating"],
    refTypes: [ "", "", "" ],
		outputValues: ["low", "medium", "high"],
		hitPolicy: "P",
		rules: [
			[">=25", "good", "medium"], 
			[">60", "bad", "high"], 
			["-", "bad", "medium"], 
			["<25", "good", "low"]
		]
   }
 },
 formulas: {
  "Priority_Order": { formula:    "tblPolicyPriorityOrder(,,61, 'bad')", finalValue: [] }
 }
}

Note that according to our criteria of age = 61 and medHistory = bad, two rules are returned as successful, rule 2 (age > 60 and medHistory = "bad") and rule 3 (age = "-" and medHistory = "bad"). Why isn't "high" returned? Because the priority list given for outputValues (low, medium, high) specifies that "medium" should have higher priority than "high".

"Priority_Order": { "value": ["medium"] }

Back to Decision Table Hit Policy: Output Order