Creating a Business Rule
A business rule can only be created using a rule template.
For instructions on adding a rule template, see TIBCO BusinessEvents Developer’s Guide.
Ensure that the All Projects option is selected under the Artifact Groups in the project explorer. Thus, rule templates are visible in the project explorer.
- Procedure
- In the Project Explorer, select the down arrow icon for the rule template you want to use and click
New Business Rule option.
The Create Artifact window is displayed with the Project Name and Rule Template Instance in the Artifact Type.
- In the
Create Artifact window, enter the business rule name in the
Artifact Path and click
Finish.
The Project Name and Artifact Type fields are pre-filled with appropriate values.
The new business rule is displayed in the work area for editing. The business rule editor depends on the rule template implementation in the application:
- If the rule template has a rule template view associated with it, an easy to use form is displayed to specify conditions and actions.
- If the rule template do not have a rule template view associated with it, a builder interface is displayed to add condition and actions. For details, see the following topics:
Business Rule Example
In the bundled example
CreditCardApplication, there are two rule templates:
SpecialOffers
and
Applicant_PreScreen
. The
Applicant_PreScreen
rule template has a rule template view (PreScreenTemplateView
) associated with it. The
PreScreenTemplateView
artifact contains the HTML code for presenting the form based on fields defined in the
Applicant_PreScreen
rule template. Thus, when you create a new business rule from the
Applicant_PreScreen
rule template, a simple HTML form opens up based on the HTML code defined in
PreScreenTemplateView
. However, if you create a business rule from the
SpecialOffers
rule template, a builder interface opens up which helps to create more complex rules.