Decision Table Semantics - Gnorion/BizVR GitHub Wiki

Semantics

condition

Any expression that returns a value.
The value is what is tested by each of the rule columns. This can be a single value or a set of values.

Examples:

Cell Content description
color A variable name
customer.name A data element within the customer object
customers A set of objects (of any type)
color=’red’ True if color is red, otherwise false
color=car.color Boolean True if the two item have identical values
{p in Persons} Returns the size of p. p is a set of persons that can be referenced in other conditions. If there are no persons then it returns 0.The rules will operate on every p in Persons whenever p is referenced in a rule

Could also be literals, but this would be unusual:

Cell Content description
T Boolean literal
‘large’ String literal

conditionValue

If no operator specified then = (comparison) is assumed is any expression that evaluates to a value (single or set)

Examples:

Cell Content description
T, F boolean
‘red’,’green’ string
>5, [5..10], >=500 comparison with literal – yields boolean
>limit comparison with a variable
<=cust.creditLimit comparison with a data element of an object
>=CreditScore(SSN) comparison with the return value of a function call (or a microservice call)

NOTE: The data type of the must be compatible (i.e. able to be compared with) the data type of the ) Ultimately after comparing the with the we MUST end up with a boolean

action

Can be either a data element name or an imperative statement

  1. If it’s a date element name then it gets set to the value in the column
  2. If it’s an imperative expression then the will be X (checkbox) if it is to be executed

Examples:

  • price
  • cust.order
  • setOfThings

actionvalue

Is either

  1. any expression that evaluates to a value (single or set)
  2. a checkbox (if checked it indicates the is to be performed.
⚠️ **GitHub.com Fallback** ⚠️