Templates provide users with the ability to create new business language rule templates and add them to the their template list. These templates can be defined for the entire rule application or to specific contexts (i.e., independent rule set, entity, field* and collection). These templates are saved along with the rule application. They are available for both language and syntax rules.
The users can select from the six different types of templates as shown in the figure above:
- Expression Templates
- Add Collection Templates
- Clear Collection Templates
- Sort Collection Templates
- Remove Collection Templates
- Assignment Templates
- Notification Templates
- Execute Rule Set Templates
- Execute Member Rule Set Templates
- Execute Method Templates
- Execute REST Service Templates
- Execute SQL Query Templates
- Execute Web Service Templates
- Activate/Deactivate Rule Set Templates
Example:
Using Placeholders
Placeholders are input parameters for a business language template. Placeholders, in rule templates, allow the user to create business language templates which take different input parameters and use them while executing the associated expression. In any rule template editor, a word enclosed with '$' symbols is considered as a placeholder. In the example shown below $NumberOfCards$is a placeholder. When used in a rule or calculation, input to the placeholder NumberOfCardscan be a derived value or a field.
Name
This column lists out all the placeholders created in the template. Entries in this column cannot be edited. This column is auto populated (real time) with placeholder names as they are created in the Business Language window.
Display Text
This column contains the text to be displayed in the place of the placeholder in the business language template.
Accepts
This column displays the type of value the placeholder accepts. This can be configured by clicking on the button against each of the placeholder.
The "Placeholder Accepts" window allows users to configure different type of values the placeholder accepts. A placeholder can be configured to accept more than on type of value.
Add Value Type
Allows users to configure the placeholder to accept a value of data types like Boolean, date, datetime, integer, number or string.
Add List
Allows users to configure the placeholder to accept values from a value list.
Add Entity
Allows users to configure the placeholder to accept an entity as its value.
Add Expression
Allows users to configure the placeholders to accept simple expressions. The users' input in the display text column will be displayed in the drop down list for the placeholder in the business language editor.
Multi-Select Check Box
Allows users to select multiple values for a single placeholder. If Multi-Select is checked, only one data type can be accepted. If Multi-Select is checked, Entity placeholder is not available.
Comments
0 comments
Please sign in to leave a comment.