Creatio development guide
PDF
This documentation is valid for Creatio version 7.10.0. We recommend using the newest version of Creatio documentation.

Business rules created in wizards

Glossary Item Box

Introduction

In bpm'online version 7.10.0 and higher, in addition to custom business rules created by developers, there are business rules created in wizards. Objects for configuring these business rules are specified in the businessRules property of the page view model schema (see “Business rules. The businessRules property”). Using the enumerations defined in the BusinesRuleModule in these objects is forbidden.

Additional properties

Additional properties of business rules defined in the of the businessRules property configuration objects of the edit page view model schema are shown in Table 1.

Table 1. Additional properties

Property Description
uId The unique rule identifier. Assigned a GUID-type value.
enabled A checkbox indicating whether the rule is active. Available values – true or false.
removed A checkbox indicating whether the rule is deleted. Available values – true or false.
invalid A checkbox indicating whether the rule is valid. Available values – true or false.

Examples

An example of a business rule created in the wizard, connected to the field property (visible, active, mandatory):

define("SomePage", [], function() {
  return {
     // ...
     businessRules: /**SCHEMA_BUSINESS_RULES*/{
        // A set of rules for the [Type] column of the view model.
        "Type": {
           // Rule code generated by the wizard.
           "ca246daa-6634-4416-ae8b-2c24ea61d1f0": {
              // Unique rule identifier.
              "uId": "ca246daa-6634-4416-ae8b-2c24ea61d1f0",
              // A checkbox indicating whether the rule is active.
              "enabled": true,
              // A checkbox indicating whether the rule is deleted.
              "removed": false,
              // A checkbox indicating whether the rule is valid.
              "invalid": false,
              // Rule type.
              "ruleType": 0,
              // The code of a property that governs the rule.
              "property": 0,
              // Logical connection between several rules.
              "logical": 0,
              // A conditions array in which the rule is triggered. 
              // In this case, the array contains one condition for comparing the value 
              // with the [Type] column value through a direct path ([Account.PrimaryContact.Type]).
              "conditions": [
                 {
                    // Type of comparison.
                    "comparisonType": 3,
                    // Expression of the left side of the condition.
                    "leftExpression": {
                       // Expression type.
                       "type": 1,
                       // Name of the view model column.
                       "attribute": "Account",
                       // Diract path, the value of which if compared in the expression.
                       "attributePath": "PrimaryContact.Type"
                    },
                    // Expression of the right side of the condition.
                    "rightExpression": {
                       // Condition type.
                       "type": 1,
                       //  Name of the view model column.
                       "attribute": "Type"
                    }
                 }
              ]
           }
        }
     }/**SCHEMA_BUSINESS_RULES*/
     // ..
  };
});

A field filtering business rule created in a wizard:

define("SomePage", [], function() {
  return {
     // ...
     businessRules: /**SCHEMA_BUSINESS_RULES*/{
        // Набор правил для колонки [Type] модели представления.
        "Account": {
           // The rule code generated by the wizard.
           "a78b898c-c999-437f-9102-34c85779340d": {
              // Unique rule identifier.
              "uId": "a78b898c-c999-437f-9102-34c85779340d",
              // A checkbox indicating whether the rule is active.
              "enabled": true,
              // A checkbox indicating whether the rule is deleted.
              "removed": false,
              // A checkbox indicating whether the rule is valid.
              "invalid": false,
              // Rule type.
              "ruleType": 1,
              // The path to the column for filtering
              // in the [Account] lookup schema, which is
              // referenced by the [Type] column of the 
              // edit page view model.
              "baseAttributePatch": "PrimaryContact.Type",
              // Type of comparison in the filter.
              "comparisonType": 3,
              // The column (attribute) of the page model acts as a value in the comparison process.
              "type": 1,
              // The column name of the edit page view model, the value of which will be filtered.
              "attribute": "Type"
           }
        }
     }/**SCHEMA_BUSINESS_RULES*/
     // ..
  };
});

© bpm'online 2002-2017.

Did you find this information useful?

How can we improve it?