In many businesses, one has many rules to work with in day-to-day operations. Banks will use rules to strike the right balance between making loans with too much risk against not making enough loans to keep their business afloat. Insurance companies will use rules to determine a rate based on an incredible variety of factors, such as a potential customer’s driving record, where they live, what kind of car they have… even credit scores! Even retailers can use rules to determine if a coupon can be used for certain product types, brands, etc.
A sample rule written in ODM Rules' Business Rule Language
ODM stands for Operational Decision Manager, which is a collection of component solutions by IBM related to business rules and complex event processing. This blog category (ODM Rules) will focus on the Business Rule Management System (BRMS), which consists of a few components to be described in greater detail in another post. ODM Rules is great for making stateless decisions (that is, each rule request's outcome is independent of any prior request's data or outcome). With ODM Rules, business users can control how decisions are made by creating and maintaining the rules implementing their business policies. Some people know of ODM Rules as ILOG JRules, the product’s name before being acquired by IBM.
A rule engine? Can’t I just ___________ instead?
When learning about a new product, many have an initial instinct of skepticism – sometimes to their advantage, sometimes not. Especially when adopting a whole new product, one may have a hard time letting go of their old ways – which is often very understandable. However, without a business rule engine, options to implement business rules are limited, likely to one of the following alternatives.
Hard code (in this case, Java) can be tricky for non-programmers to access and read.
Hard code: Yes, if something can be created in a rule engine, it can be written as straight code in just about any language. Granted, it gives an incredible amount of control, but in the end, the result is code which is difficult to manage. This code may be difficult for even a fellow programmer to pick up and understand, let alone a business user. Having business users get involved with maintenance directly? Forget about it! The gap between business and IT is especially dangerous considering that between developing, writing, reading, interpreting, and executing business requirements, something could be misunderstood, if not overlooked completely.
Just as high-level languages are generally easier to understand than the machine code that computer systems ultimately run on, a good BRMS will have its rules represented in such a way that a non-technical person can understand them just as well as a programmer. With business-user rule development, the final product doesn’t feel like the result of a game of “telephone.”
Database: When dealing with many rules following similar formats, one may put everything in a database. This can give business users some CRUD (Create, Read, Update, Delete) abilities, but there still needs to be a lot of code behind the scenes to run the process and go through each table – code that runs into the same issues described above. It also comes at the expense of flexibility: rules must adhere to the rigid structure defined in the tables. Additionally, the resources spent creating a decent front end can get to be significant, especially if that front end is designed to be reasonably flexible.
Why ODM Rules?
To be clear, ODM Rules is far from the only rule engine in existence today; there are others that exist on a variety of platforms. However, ODM Rules stands out from the rest for its business-friendly features, including development and testing tools and its governance capabilities. These features not only improve business involvement, but also reduce the time it takes to make these changes go live. ODM Rules is also quite flexible. While it is built on a Java platform, it is most commonly run as a SOAP or REST web service which can be executed on virtually any major platform, including Microsoft’s .NET. For implementations that require it, there is also a version of ODM Rules for z/OS. (READ: ODM Rules Components)