Writing the Rules
The rules engine that's best for your business
Hands on Rules engines are now a common business tool, helping automate what are often complex decision-making processes. Now with web front-ends and business language IDEs, there's a lot to look at when choosing your software.
While some tools help transfer business logic change responsibilities from developers to business users, others mean learning a whole new way of programming, using declarative languages to separate business logic from data – without changing the essential object-oriented nature of your applications.
Like many recent developer tools, ILOG's JRules 6 uses an Eclipse-based IDE to give developers access to its Rule Team Server. The heart of the JRules platform, the Rule Team Server is a content management system, where rules are developed and stored, prior to being deployed on ILOG's Rule Execution Server. There's a lot in JRules, and ILOG has tried very hard to simplify rule development and management. This has been distilled into what ILOG refers to as "Rule Care" and "Rule Tech".
If you're a developer, then you'll be working with Rule Tech. Most developers will use JRules to design and build rule applications, using the ILOG's Rule Studio Eclipse-based IDE alongside their preferred Java development tools. With Eclipse support for multiple perspective layers, developers can switch between developing rules, the Java code to use them, and the web UI to deliver the application (or even use Adobe's Flex to tie Flash to rules-based systems), without leaving their one IDE.
ILOG uses a standard object model to build new rule projects from Java classes or XML files – so you can start with existing data models. This approach speeds up rule development, as existing code becomes the basis of any rules you need to deploy. The resulting rule artefacts use an extensible
if then else structure to define a business rule language, with decision tables for more complex rule structures. The development environment lets you control how decision tables are used, and how error cases are handled. Code completion and error notification tools help get new rule applications out the door quickly, while a graphical rule flow editor helps structure rules into a business process.
Rules can be embedded in templates, which allow non-technical users to make changes quickly. Templates can be locked down and definitions frozen, allowing only specific sections to be changed. This means a business user could be allowed to change a trigger value with changing business needs, but the rest of a rule or rule flow can be kept unchanged (and that this can be enforced). Business users can edit rules using a relatively simple business action language, which can also be constrained in templates or rule projects. It's relatively easy to get started with JRules. Tutorials in the help files mean you can quickly see how to build key rules artefacts, along with deployment and management techniques.
Once deployed, JRules' rule modules run on top of an application server. ILOG bundles JBoss with its installer, though you can run JRules on any JEE server. The Rule Team Server loads rules on the Rules Execution Server, and a scenario manager lets you test rules before you run them – and lets you keep control of rules if processes need to change. The Rules Team Server also holds configuration information for the Rules Execution Server, minimising the time needed to deploy additional rules servers. You'll be able to get timing information from the Rules Execution Server, which helps debug operations – and helps you fine tune your rules and processes.
ILOG's Rule Care concept hands rule maintenance to business owners, rather than overworked developers. It uses a web front end to the Rule Team Server to let business teams edit and manage existing rule libraries. New rules can be deployed using this UI, and existing rules validated. The Rule Team Server provides a repository for all rules and is populated from a separate development repository. Having a repository of record is important as it helps keep any rules-based business processes compliant with the appropriate regulations – as well as providing an audit trail for any changes to your rules.
There's a lot of functionality in ILOG's JRules, with a powerful rules language, a credible IDE, and a large selection of management and business user tools. With its own rules execution server, it's also very scalable, and ready for large deployments. If you're running a large scale ecommerce service and need to reduce risk and automate key business processes, ILOG has a tool for you. It may be overkill for some smaller businesses – but there are other tools more suited for that market. ILOG doesn't limit you to Java [although Daniel Selman of ILOG is Spec Lead for the JSR 94 Java Rule Engine API – Ed] either, as a .NET version of its rules engine is also available.