Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:3000_rule_language:0700_rule_language [2022/08/25 00:00] – removed - external edit (Unknown date) 127.0.0.1 | docs:3000_rule_language:0700_rule_language [2025/06/12 02:35] (current) – Rename to AwareIM aware_support3 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{tag> | ||
| + | [< | ||
| + | ====== Notes on rule execution ====== | ||
| + | ===== Type conversions ===== | ||
| + | |||
| + | When performing arithmetic calculations with attribute values and numeric constants // | ||
| + | |||
| + | * Addition of two strings causes the strings to be concatenated, | ||
| + | * Addition of a string and a number produces a string, for example ''' | ||
| + | * If a value is undefined it is omitted from calculations, | ||
| + | * Strings may not participate in any arithmetic calculations other than addition. | ||
| + | * References may not participate in arithmetic operations. | ||
| + | * A number added (subtracted) to (from) a date produces the date which is “value” days greater or less than the original date, where “value” is the value of the number. For example, \\ '' | ||
| + | * A number added (subtracted) to (from) a timestamp produces the timestamp which is “value” hours greater or less than the original timestamp, where “value” is the value of the number. For example, '' | ||
| + | * Duration added or subtracted from a date produces date. | ||
| + | * No other arithmetic operations with date/ | ||
| + | <callout type=" | ||
| + | * Duration added to or subtracted from another Duration produces Duration | ||
| + | * Attributes of the '' | ||
| + | * Attributes of the '' | ||
| + | |||
| + | ===== Comparison ===== | ||
| + | |||
| + | The following rules apply when comparing values in the Relational Expression: | ||
| + | |||
| + | All attribute types can be compared for equality or non-equality (even references), | ||
| + | |||
| + | |||
| + | * If strings are compared with numbers, numbers are converted to strings, for example, the following will only be true if the value of '' | ||
| + | * If a value of an attribute is '' | ||
| + | |||
| + | Only numbers, dates and durations can be compared using other operators (''<'', | ||
| + | |||
| + | |||
| + | |||
| + | ===== References ===== | ||
| + | |||
| + | It is possible to use references and reference lists inside rule conditions and assign reference and reference lists in actions. For example, the following rule: | ||
| + | |||
| + | <code aim>IF Customer.Policies.Cartype=' | ||
| + | |||
| + | will check every policy in the list of policies of a customer and if a car type of the policy is wagon will set the premium of such policy to 100. | ||
| + | |||
| + | The following rule: | ||
| + | |||
| + | <code aim>IF Policy.CarType=' | ||
| + | |||
| + | |||
| + | will set the policy, the car type of which is “wagon”, | ||
| + | |||
| + | If multiple references are used in a rule condition the corresponding action will be triggered if the condition holds for ANY value of the reference in the reference list. For example, | ||
| + | |||
| + | |||
| + | <code aim>IF Customer.Policies.CarType=' | ||
| + | |||
| + | The action in this rule will be executed if there is any '' | ||