Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
3000_rule_language:0700_rule_language [2022/08/21 22:48] – ↷ Page moved from docs:3000_rule_language:0700_rule_language to 3000_rule_language:0700_rule_language administrator3000_rule_language:0700_rule_language [2026/08/13 07:33] (current) – Imported by DokuWiki Advanced Plugin aware_support3
Line 5: Line 5:
 ===== Type conversions ===== ===== Type conversions =====
  
-When performing arithmetic calculations with attribute values and numeric constants //**Aware IM**// automatically performs the necessary type conversions if arguments are of different types. The following conversion rules apply:+When performing arithmetic calculations with attribute values and numeric constants //**AwareIM**// automatically performs the necessary type conversions if arguments are of different types. The following conversion rules apply:
  
   * Addition of two strings causes the strings to be concatenated, for example '''John' + ' ' + 'Smith//'//'' produces 'John Smith'   * Addition of two strings causes the strings to be concatenated, for example '''John' + ' ' + 'Smith//'//'' produces 'John Smith'
Line 16: Line 16:
   * Duration added or subtracted from a date produces date.   * Duration added or subtracted from a date produces date.
   * No other arithmetic operations with date/timestamp are allowed.   * No other arithmetic operations with date/timestamp are allowed.
-**Note**no arithmetic operations with date/timestamp may be used inside the ''FIND'' action.+<alert type="primary" icon="fa info-circle"> 
 +**note** 
 + 
 +no arithmetic operations with date/timestamp may be used inside the ''FIND'' action.</alert>
   * Duration added to or subtracted from another Duration produces Duration   * Duration added to or subtracted from another Duration produces Duration
   * Attributes of the ''Yes/No'' type may not participate in arithmetic calculations.   * Attributes of the ''Yes/No'' type may not participate in arithmetic calculations.
Line 31: Line 34:
   * If a value of an attribute is ''UNDEFINED'' it is considered to be 0 for comparison purposes.   * If a value of an attribute is ''UNDEFINED'' it is considered to be 0 for comparison purposes.
  
-Only numbers, dates and durations can be compared using other operators (''<'', ''>'', ''<='', ''>='').+Only numbers, dates and durations can be compared using other operators (''<'', ''>'', ''%%<=%%'', ''>='').
  
  
Line 39: Line 42:
 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: 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>If Customer.Policies.Cartype='Wagon' Then  +<code aim>IF Customer.Policies.Cartype='Wagon' THEN Customer.Policies.Premium=100 </code>
-Customer.Policies.Premium=100</code>+
  
 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.  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. 
Line 46: Line 48:
 The following rule: The following rule:
  
-<code>If Policy.CarType='Wagon' Then  +<code aim>IF Policy.CarType='Wagon' THEN Customer.CurrentPolicy=Policy </code>
-Customer.CurrentPolicy=Policy</code>+
  
  
Line 55: Line 56:
  
  
-<code>If Customer.Policies.CarType='Wagon' Then ...</code> +<code aim>IF Customer.Policies.CarType='Wagon' THEN ... </code>
- +
  
 The action in this rule will be executed if there is any ''Policy'' that the ''Customer'' owns that has the ''Wagon'' car type.  The action in this rule will be executed if there is any ''Policy'' that the ''Customer'' owns that has the ''Wagon'' car type.