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
docs:3000_rule_language:0300_rule_language [2022/08/25 00:00] – ↷ Page moved from 3000_rule_language:0300_rule_language to docs:3000_rule_language:0300_rule_language administratordocs:3000_rule_language:0300_rule_language [2022/09/13 18:15] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ====== Rule Definition ====== ====== Rule Definition ======
 Rule is defined as follows: Rule is defined as follows:
-<code>If (RuleCondition) Then+<code aim> 
 +IF (RuleCondition) THEN
     ActionList     ActionList
-Else  +ELSE  
-    ActionList +    ActionList</code>
-</code>+
  
  
-where ''RuleCondition'' defines one or more conditions that have to hold true before the specified ''ActionList'' is executed. ''If'' and ''Else'' statements are optional, so it is possible to have a rule which only has action statement(s) – such rules are called unconditional rules. It is also possible to include If statement within Else+where ''RuleCondition'' defines one or more conditions that have to hold true before the specified ''ActionList'' is executed. ''IF'' and ''ELSE'' statements are optional, so it is possible to have a rule which only has action statement(s) – such rules are called unconditional rules. It is also possible to include IF statement within ELSE
-<code>If (RuleCondition) Then +<code aim
-    ActionList +IF (RuleCondition) THEN
-Else If (RuleCondition) Then+
     ActionList     ActionList
-Else+ELSE IF (RuleCondition) THEN
     ActionList     ActionList
-</code>+ELSE 
 +    ActionList </code>
  
  
Line 25: Line 25:
  
 Examples of rules: Examples of rules:
-<code> +<code aim>IF Account.State='CLOSED' AND Account.Balance<>THEN 
-If Account.State='CLOSED' AND Account.Balance<>Then +    REPORT ERROR 'Account with non-zero balance cannot be closed' </code>
-    REPORT ERROR 'Account with non-zero balance cannot be closed' +
-</code>+
  
-<code>CreditAccount.AvailableFunds= +<code aim>CreditAccount.AvailableFunds = CreditAccount.CreditLimit+CreditAccount.Balance-CreditAccount.NonClearedFunds </code>
-CreditAccount.CreditLimit+CreditAccount.Balance-CreditAccount.NonClearedFunds +
-</code>+
  
-<code>If Account.Type IS UNDEFINED Then +<code aim>IF Account.Type IS UNDEFINED THEN 
-    FIND AccountType WHERE AccountType.Name='Credit' Account.Type=AccountType +    FIND AccountType WHERE AccountType.Name='Credit' Account.Type=AccountType </code>
-</code>+
  
  • Last modified: 2022/09/13 18:09