<< Click to Display Table of Contents >> Business rules elements |
Scripting rules have different elements that provide structure and facilitate writing code using simple wizards.
A rule might be composed of several elements. We recommend using them to give structure to your rule. However, adding more elements increases the complexity and at a certain point it may make errors within the expression harder to trace .
To include an element, right-click the vertical line of the rule (black arrow). This will display a drop-down menu of all elements.
Select the desired element and give it a name in the Properties pane on the left
Double-click the element created and select the Properties option to establish its evaluation characteristics in the new window.
When working with the elements, the code associated with the logic expressed in the design is created automatically in the Code View.
•Expression: This element offers the possibility to type any desired code.
•If: Offers the possibility to select one of several paths by means of conditionals. The else path will always be established.
•While: Executes a cycle as long as a condition is met.
•For: Executes a cycle a finite number of times, starting with an initial value and increasing the value by a specified amount on each iteration.
•Function: Allows the use of functions created as library rules in each project.
•Web service: Include web service calls.
•Assignment: Allows value assignments to attributes in the data model using a very simple interface.
•Boolean expression: Handles Boolean conditions. When the conditions are met the expression returns True, otherwise they return False.
•Iterate over fact: Used to carry out iterations (or cycles) over a one-to-many relationship EXCLUSIVELY when the relationship cannot be accessed directly through the data model using XPath.
•Iterate over XPath: Used to carry out iterations (or cycles) over a collection XPath, that is, a one-to-many relationship.
Last Updated 2/25/2022 3:27:09 PM