Business Rules
The Builder Business Rules serve to carry out validations that reflect the business rules of the applications. They can be used for form validation and/or associated with the operation of inclusion, modification, and deletion of business objects.
How to access
Access the Business Rule configuration page by going to menu Builder > Management > Business Rule.
Procedure
Register a new business rule
- To register a new database, click on the "New" button;
- Business Rules are built by designing flow or coding a Rhino script.
Create Flow type business rule
- On the Basic data tab, fill in the Name and Description of the Business Rule, inform the Builder Application to which it will be associated, and choose Flow Type.
- On the Variables tab click on the "Add" button. The following screen will be displayed:
- Fill in:
- The Variable Section field:
- Variable name
- Description
- Store in the database: whether the variable should be stored internally, in the Builder data model.
- Return variable: whether the variable should be included in the output JSON object returned at the end of the business rule flow's execution.
- Values list: Whether the variable contains a values list.
- Mandatory entry variable in execution: this option must be selected if the execution of the flow depends on the existence of the variable before the execution starts.
- Variable type
- Variable Initial value, which can be a constant value or a value returned by script execution.
- Click on the "Include" button to finish creating the variable;
- On the Actions tab, click on the "Add" button. The following screen will be displayed:
- Fill in:
- The Action Section field:
- Identifier: it is how the action will be associated with the flow diagram.
- Name: this is the name by which the action will be referenced in the flow diagram.
- Rhino Script to be executed when the action is triggered.
- Click on the "Include" button to finish creating the action;
- To edit the diagram, click on the corresponding tab. The following screen will be presented:
- The elements that can be added to the flow, are in the palette in the left corner of the screen. To include an element in the flow, select it and drag it to the drawing page. A pop-up window with the properties of the element will be displayed on the screen. Fill in the information according to the chosen element;
- After editing the diagram, click on the "Save" button in the top bar.
Create Script type business rule
- On the Basic data tab, fill in the Name and Description of the Business Rule, inform the Builder Application to which it will be associated, and choose Flow Script:
- Code the Rhino script that implements the business rule and, if necessary, add variables as explained in the section Variables of type Flow;
- When finishing editing the script, click on the "Save" button on the top bar.
⚠Attention!
New business rules are blocked by default. This means that the rule cannot be used unless it is unblocked. To unblock select the desired rule and click on the Unblock option.