Feeds

Writing the Rules

The rules engine that's best for your business

Combat fraud and increase customer satisfaction

JBoss Rules 3.0.5

JBoss's Rules technologies are part of its JEMS (JBoss Enterprise Middleware Suite) SOA platform, and are already in wide use. JBoss sees customers using the tools to help implement service architectures, as rules can be used to link and orchestrate services. Version 3.0.5 was released in November 2006, and while it may not have all the features of some of its competitors, it has the advantage of offering a range of interfaces and is small enough to be embedded in existing applications – rather than requiring its own server. It's also open source, so you can tailor it to work just the way you want. There are some useful publications on the technologies used in JBoss Rules here.

Developing new rules is relatively easy, and JBoss provides an Eclipse plug-in to add rules development features to existing IDEs. As JBoss Rules is an extension of the Drools project [the Drools project voted to join forces with JBoss at the end of 2005 – Ed], you'll need to become familiar with JBoss' Drools business engine language (and you'll find plenty of references to Drools in the copious online documentation). Drools provides forward chaining, using fact propagation to provide a conclusion which is then acted on by an application. The Eclipse IDE hides Drools' XML syntax, providing a more readable UI; you can still edit the XML by hand, but we&'d recommend using the IDE tools. You can use the JBoss site as an update server, making sure you always have the latest version of the IDE installed in your copy of Eclipse.

While it may not be as business-user-friendly as ILOG's JRules, JBoss Rules can be used by non-developers. Its business language offers BASIC-like functions, and hides the Java and XML code needed to implement rules in your applications. The application is JSR 94 compliant, simplifying integration with existing applications and application servers. One significant omission is a rule repository. While you can use existing source control tools, like CVS, to manage rules, this approach adds an extra layer of complexity, and could discourage business users.

Building rules is relatively easy. Like languages on other rules engines, the Drools language is declarative, and decouples business logic from data. Left hand and right hand sides link facts to actions. Rule sets are delivered as packages, and include declarations, variables, functions and rule definitions.

While Drools uses the Rete algorithm to execute rules, developers don't need to be familiar with the approach – though it can help in defining rule sets when filtering facts. There's also support for Leaps, an algorithm which can speed up rules processing. You can define activation groups in JRules, which will group several rules so that if one fires, the rest will be ignored; an approach which works well when managing rule priorities. JBoss's documentation shows the open source nature of the project, with lots of theoretical detail alongside sample code.

Rules are first authored, and then parsed to ensure the rule grammar is correct. Once parsed, the rules are packaged and can be deployed in a runtime RuleBase. You can access the resulting RuleBase from your Java code: facts are delivered as Java objects, and can be asserted or retracted. If you're using decision tables, you can build them in Excel or other spreadsheets – a useful approach which helps business users get to grips with rule definitions in a familiar environment.

Like most JBoss tools, JBoss Rules is free to download. Community support is available online and through a wiki. If you need more support, you can purchase support from JBoss, which will give you access to the development team. If you're customising JBoss Rules or building it into your applications, you'll probably need this level of support.

Development is fast, with new versions released regularly. The next major update, JBoss Rules 3.2 will be released in Q1 2007, and will add new elements to JBoss' rules language, as well as improving the IDE and adding new debugging tools. Future versions will add the missing rule repository, along with a web-based rule development UI.

The ultimate aim of the JBoss team is to deliver a full business management suite. JBoss Rules is part of this vision, though it still falls short of delivering the whole picture. While the current rules engine may not have as many features as its competition, JBoss Rules is a powerful tool, and one that can be used by any Java developer who wants to add a rules engine to an existing application without significant investment. JBoss Rules isn't quite ready for enterprise heavy-lifting, but it certainly packs a hefty middleweight punch.

High performance access to file storage

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
Windows 8.1, which you probably haven't upgraded to yet, ALREADY OBSOLETE
Pre-Update versions of new Windows version will no longer support patches
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
prev story

Whitepapers

Designing a defence for mobile apps
In this whitepaper learn the various considerations for defending mobile applications; from the mobile application architecture itself to the myriad testing technologies needed to properly assess mobile applications risk.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.