Version 3

    Obviously your rules need to work off a suitable object model (normally a "flatter" model works) .


    A good practice is to model this very close to the business domain: ie don't use those rediculous "Gang of Four" or J2EE patterns or any noise like that. Just simple objects that represent the problem in business terms as far as possible. This may mean that you will need to map  a little between your applications domain model and the model for the rules (maybe not), but the effort will be well rewarded for clearer self documenting rules.


    The upcoming 3.2 release of JBoss Rules has "fact templates" (deftemplates for the CLIPS die hards) - these are perfect constructs for creating "business objects" for rules. They are very flat structures, where you specify field names, and a type. You can have "list" types, but you can not nest a template within another, which makes the rules much easier to write and manage.

    - in future, it is anticipated that there will be some mapping tools that will allow you to map from your domain objects to fact templates easily (and also things like web service, XML documents etc).