Implementing business rules

Before you begin

After determining where to place a trigger point, placing the trigger point, and defining your strategy objects, you must provide a method to implement the business rules and then create the rules. In addition, you might choose to organize your rules by creating rule folders.

Note: Although the development tasks in this article are shown in sequential order, the exact sequence is left to your discretion. In particular, you might choose to write the rule implementor before or after creating the actual business rules.

Why and when to perform this task

The business rule encapsulates and externalizes the business logic for the rule and any data that parameterizes the rule. Complete the following process to implement business rules:

Steps for this task

  1. Provide an implementation, called a rule implementor, for each business rule that you create
    The rule implementor provides the actual business logic for the rule, implemented in Java. The rule implementor's fire() method is called when the business rule is triggered to actually perform the processing for the rule. Several generic rule implementors are shipped with BRBeans, which might be useful in some situations. However, if these rule implementors do not meet your needs, you can write your own rule implementor. Refer to the section on writing your own rule implementor for details.
  2. Use the Rule Management Application (RMA) to create the business rule
    1. In the Rule Browser window, select the folder where you want the new rule to be created.
    2. From the main menu, click File > New > Rule.

      In the New Rule properties window, use the following tabs to define the rule:

      General
      Use this tab to enter general information about the rule.
      Implementation
      Use this tab to define the manner in which the rule is implemented.
      Description
      Use this tab to define the purpose and intent of the rule.
      Dependent Rules
      Use this tab to specify the rules that the newly created rule will depend upon.
      Other
      Use this tab to to establish precedence, and enter information that is relevant to you, but does not fit into any other category.

    3. To complete the creation of the rule, click OK.
      If there are any mandatory fields still undefined, either go back and give them a value, or make the rule unavailable for use (see Status in the General tab for more information on this).
  3. Create a rule folder using the Rule Management Application to contain the new business rule
    1. In the Rule Browser window, select the folder where you want the new folder to be nested.
    2. From the main menu, click File > New > Folder.
      A new folder appears in the folder hierarchy in edit mode. Enter a folder name and hit the Enter key.

Related concepts
Rule Management Application
Related tasks
Developing BRBeans



Searchable topic ID:   tbrb_impri
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/brb/tasks/tbrb_impri.html

Library | Support | Terms of Use | Feedback