Business rules
A business rule is a required operation that applies to a specific set of business conditions. For example, you can create a business rule that offers a discount to customers who spend more than a certain amount. The business rule can be modified in the future if the business climate changes and the amount of discount must change.
You can use IBM® Integration Bus to write business rules by using natural language instead of coding in ESQL or Java™. The use of natural language in the authoring of the rules means that they can be understood by business users (for example, a business analyst). In IBM Integration Bus, you create a decision service, which is a collection of rules.
You can also import business rules that are written in IBM Operational Decision Manager and use them to process messages in IBM Integration Bus.
Consider an example of a business rule where customers who spend a lot of money in a single transaction are provided an upgrade.
Name | Type | Verbalization |
---|---|---|
myCustomer | CustomerType | The customer |
if
the category of the customer is Gold
and the value of the shopping cart of the customer is more than $1500
then
set the category of the customer to Platinum
Rules are written by using the Business Action Language
(BAL). For more information, see Structure of a business rule.You can find more information about XML binding, XML declarations, and schema mapping limitations in IBM Operational Decision Manager product documentation online.
For an example of how the incoming message and XML schema relate to the parameters that are passed into business rules, see Example rules that are created from a message instance and schema.
These parameters and rules are contained in a decision service (.rules) file that can be deployed. When you deploy a BAR file that contains a decision service that you created in the IBM Integration Toolkit, the decision service is compiled into a rule set (.ruleset). Imported rules contain compiled rule sets. In the form of a decision service, the business logic can be called from the message flow as a business rule application. Therefore, changes to the business policy do not require changes to the message flow.
You can write rules in the IBM Integration Toolkit and at run time retrieve them from the local application, library, or integration project. You can also import business rules that were written in IBM Operational Decision Manager and retrieve them from an IBM Operational Decision Manager repository at run time. A configurable service is provided for you to specify connection details.