Creatio development guide
PDF

Business rules created via wizards

Glossary Item Box

Introduction

Starting from version 7.10.0 besides the business rules created by developer tools, there exist the business rules generated by section or detail wizards.

  • Wizard generated business rules are added to the businessRules client module property.
  • The generated business rules have higher priority at execution.
  • The BusinessRuleModule enumerations are not used when describing the generated business rules.

See the "Setting up business rules” article for more information on business rule setup via wizards. The manual setup of the generated business rules is covered in the "Business rules. The businessRules property” article.

Additional properties

You can find additional properties of the wizard generated business rules in table 1.

Table 1. Additional properties

Property Details
uId. Unique rule identifier. The "GUID” type value.
enabled Enabling checkbox. Can take the true or false values.
removed The checkbox indicating if the rule is removed. Can take the true or false values.
invalid The checkbox indicating if the rule is valid. Can take the true or false values.

Cases

Case of a master generated business rule connected with a field property (whether it is visible, enabled or required):

define("SomePage", [], function() {
  return {
     // ...
     businessRules: /**SCHEMA_BUSINESS_RULES*/{
        // Set of rules for the [Type] column of the view model.
        "Type": {
           // Wizard generated rule code.
           "ca246daa-6634-4416-ae8b-2c24ea61d1f0": {
              // Unique rule identifier. 
              "uId": "ca246daa-6634-4416-ae8b-2c24ea61d1f0",
              // Enabling checkbox.
              "enabled": true,
              // Checkbox indicating if the rule is removed.
              "removed": false,
              // Checkbox indicating if the rule is valid.
              "invalid": false,
              // Rule type.
              "ruleType": 0,
              // The property code, regulating the rule.
              "property": 0,
              // Logical connection between several rule conditions.
              "logical": 0,
              // Condition array, whose performance triggers the rule implementation.
              // Compares the [Account.PrimaryContact.Type] value with the [Type] column value.
              "conditions": [
                 {
                    // Comparison operation type.
                    "comparisonType": 3,
                    // Expression of the left side of the condition.
                    "leftExpression": {
                       // Expression type — the view model column (attribute).
                       "type": 1,
                       // The view model column name.
                       "attribute": "Account",
                       // The path to the [Account] lookup schema, whose value
                       // is compared in the expression.
                       "attributePath": "PrimaryContact.Type"
                    },
                    // Expression of the right side of the condition.
                    "rightExpression": {
                       // Expression type — the view model column (attribute).
                       "type": 1,
                       // The view model column name.
                       "attribute": "Type"
                    }
                 }
              ]
           }
        }
     }/**SCHEMA_BUSINESS_RULES*/
     // ..
  };
});

Case of a master generated business rule for field filtration:

define("SomePage", [], function() {
  return {
     // ...
     businessRules: /**SCHEMA_BUSINESS_RULES*/{
        // Set of rules for the [Type] column of the view model.
        "Account": {
           // Master generated rule code.
           "a78b898c-c999-437f-9102-34c85779340d": {
              // Unique rule identifier. 
              "uId": "a78b898c-c999-437f-9102-34c85779340d",
              // Enabling checkbox.
              "enabled": true,
              // Checkbox indicating if the rule is removed.
              "removed": false,
              // Checkbox indicating if the rule is valid.
              "invalid": false,
              // Rule type.
              "ruleType": 1,
              // Path to the filtration column of the [Account] lookup schema,
              // that the [Type] column of the edit page view model 
              // refers to.
              "baseAttributePatch": "PrimaryContact.Type",
              // Filter comparison operation type.
              "comparisonType": 3,
              // Expression type — the view model column (attribute).
              "type": 1,
              // The view model column name,
              // whose value will be used for filtration.
              "attribute": "Type"
           }
        }
     }/**SCHEMA_BUSINESS_RULES*/
     // ..
  };
});

 

See also

© bpm'online 2002-2019.

Did you find this information useful?

How can we improve it?