Business rules
Business rules are used to create universal expressions and conditions to control processes' behavior. Using them is a convenient alternative to employing SQL expressions. Creating business rules is intuitive. They can be stored in one place and grouped for easy access.
Rules are defined globally in System settings or for an individual process. Once they are defined, rules may be used in any area of Designer Studio where a query can be applied (provided that the data type returned by the rule matches the data type expected from the query).
Adding a rule
To add a business rule to be used only in a given process, go to the Configuration node available in the application tree. Select Business rules, and then click the New rule button on the right.

Once a rule is defined, it can be used anywhere in Designer Studio where query input is available. This is possible if the rule returns the correct data type for that location.
If it is necessary to change a business rule, simply apply the changes to the location where the rule was defined (i.e. globally in System settings or in the configuration of a particular process). It is not possible to modify the rule separately at each location where it is used.
Business rules can be grouped. To create a group of business rules, hit the New group button, and then drag and drop the available rules in the newly created group.
Creating a rule
Both business rules and form rules can be built in two ways:
- by dragging and dropping elements from the right-hand dictionary (①) to the work area (②). You can also select where you want to add an element in the work area – find this element in the dictionary, and double-click it. This will add it to the selected place,
- by activating the work area (②) and starting typing in it. To activate the work area, click inside it or select it with the Tab key. Then, start typing the first letters of the element you want to insert, for example, the operator's or the function's name. The program will suggest matching elements. You can accept and insert them into your rules by pressing Enter or by double-clicking them.

Please note that you do not need to use the mouse to create and navigate rules. You can move between the elements using the Tab and the arrow keys on your keyboard. To accept a change or selection, press Enter.
For details, see the article Creating business/form rules without the use of a mouse on our technical blog.
Returned value types
Business rules can return various types of data. The returned value type also defines the availability of the rule – i.e., certain query fields expect a specific type of data – only rules that return a particular type will be available in that field. Business rules can return the following types of data:
Value – text (any character string), decimal (a floating-point number), date (date).
Used for: defining default vales of form fields.
Execution condition – Boolean (rule returns "True" or "False").
Used for: defining conditions for executing actions, and in the step of "Flow control" type (when a path is chosen based on a form field value).
User list – this rule can return a list of users (or groups) in the format: ID#Name. The identifier (ID) can be either an email address or login. The Name is optional.
Used for: defining the visibility of a form field, visibility of a form field in a specific step, and the visibility of a path.
Edit rule
After clicking the Edit button (icon with three dots) available to the right of the work area, the Edit rule window opens:

The dictionary (①) is also available in this window. To make the creation and using of rules easier, all variables available in the dictionary are converted into cohesive objects that are convenient to use and display both an intuitive variable name and its variants. You can drag variables to the editor from the tree on the right side or insert them in the place of the cursor by double-clicking on the tree element. If a variable has variants (for example, different parameters, such as the email address or the username of the manager, can be extracted from the "Current user" variable), these variants appear when you right-click on the element. You can delete an object by clicking on it and pressing Delete or Backspace.

The variables tree is built dynamically depending on the context in which the editor has been launched. You can search for desired elements inside the tree by entering an expression in the filter field (②). The content of the filtered tree changes automatically after each change of the entered text. You can restore the tree to its original form by deleting values entered in this field.
The Edit rule window also features the option Switch all editors into advanced mode (③). When selected, all dictionary elements are displayed as tagged variables with their designations (fields) in the database.

Testing rules
You can test if your rule works using the dedicated options in the bottom of the Edit rule window:
- Instance ID – identifier of the workflow instance that will be used to test the rule or preview the expression,
- Load ID – loads the ID of the last workflow instance created in the process and inserts this value in the instance ID field,
- Test – performs a test of the rule with the variable values loaded in the context of the specified workflow instance. If the test passes correctly, the Expression preview window is displayed with the value returned by the rule for that workflow instance,
- Show – opens a window where the expression is displayed with the variable values taken from the specified workflow instance.
The option Create universal rule is available from the application level. Selecting this option and saving the newly-created rule as a process rule will make it available in the selected process.
Tooltips and contextual help
To learn more about an operator or function that is placed in the work area, hover your mouse cursor over the desired element to view its description and an example of use.

Dictionary elements for building rules
When creating rules, you can use the dictionary of elements (also known as Variables editor or Expression editor) available on the right-hand side of the window. This is a tool that supports the writing of expressions containing variables, i.e. strings of text, which are usually limited by curly braces "", have a special meaning in the system, and are converted into corresponding text expressions during execution.
The elements for building rules are organized in the following tabs: