Show pageOld revisionsBacklinksExport to PDFExport Page to HTML/PDFBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{tag>Manuals Rule_Language}} [<10>] ====== Rule Definition ====== Rule is defined as follows: <code aim> IF (RuleCondition) THEN ActionList ELSE ActionList</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: <code aim> IF (RuleCondition) THEN ActionList ELSE IF (RuleCondition) THEN ActionList ELSE ActionList </code> Rules operate on business objects and/or their attributes, i.e. both the condition and action parts of a rule may refer to a business object and its attribute. Business objects are referred to by name, for example Account. Attributes of a business object are referred to by the attribute name where the name of the attribute is separated from the name of the business object by the dot symbol, for example ''Account.State''. Examples of rules: <code aim>IF Account.State='CLOSED' AND Account.Balance<>0 THEN REPORT ERROR 'Account with non-zero balance cannot be closed' </code> <code aim>CreditAccount.AvailableFunds = CreditAccount.CreditLimit+CreditAccount.Balance-CreditAccount.NonClearedFunds </code> <code aim>IF Account.Type IS UNDEFINED THEN FIND AccountType WHERE AccountType.Name='Credit' Account.Type=AccountType </code> Last modified: 2022/09/13 18:15 Log In