Sunday, January 28, 2007

Enhancing JBossRules DSL

Peter Lin has been doing some great work on enhancing the auto completion for DSLs, which he has blogged with screenshots. He also covers his plans to make the DSL auto completion more intelligent - great work Peter!!!
http://woolfel.blogspot.com/2007/01/enhancing-jbossrules-dsl.html

Saturday, January 13, 2007

Relocation relocation & repository progress (Michael Neale)

Well I have had a great time in London, but it has gone fast. The entire purpose of this extended trip was to spend quality time with Mark so we could put our heads together and solve some of the hard design issues for the rules repository and version 3.2 (which who knows, may be called version 4?). I think we have achieved a lot.

So sad to be leaving, but also will be nice to be "home" again, still doing the same job of course ! (amazing how hard it is for people to understand that who have "real" jobs).

The rules repository has come along nicely (and we have of course been thinking about the often requested ability to package up process definitions a-la jBPM as well, but that's another story).
So a quick update is in order I believe.

User driven categorisation is working out nicely:

They allow a simple hierarchical classification scheme (of your choice). Thanks to the magic of power arithmetic, you can manage a very large number of rules with a very shallow "tree" of categories. We don't have user specified fields (yet) but its easy to add - initially we want to encourage people to manage rules in something of a standard way (of course, we are prone to being influenced by peoples opinions).

Dublin core makes for a kind of useful set of standard "content attributes" that people can attach meaning to (with the hope that external systems in the future will be able to report and examine the rule base in a meaningful way).

The rule modeller (UI) mentioned before is also working out nice.



Of course, all the meaty stuff has been happening under the covers, so not much time to work on Look and Feel, but that should be changing shortly. Other rule authoring paradigms are plugging in as well. Of course, and it is all being integrated to work with the IDE tooling as much as possible.

Efficient versioning: Every save action in the repository is version ed. This (default) behavior may cause some alarm, due to the number of versions created. Thankfully, the concept of "workspaces" for storage means that the version storage can (if needed) be configured to be on a separate larger device/database to the main repository, allowing for huge rule bases to scale, very handy.

In other news, the "mvel" integration (a simple expression language) is coming along, and should be in the M1 release (more about that in another blog).
We also now have effective dating of rules, which is a handy (and often asked for feature, but often forgotten about-to-implement).

The next steps for the repository (which is as much a list to remind me after I get over the wicket jetlag that is about to hit):
* Archiving of rules (not as easy as it sounds, at least to make it usable).
* Audit logging and reporting (a lot of audit ability is intrinsic to the repository, but still, I have seen many an audit log grow unusable over time).
* Efficient introspection of the rule object model (as we are still pojo based, requires some magic)
* Keeping configuration options under control ;) want it to be as "out of the box" as possible and not terrify people with the possibilities !
* Version browser (started this on Friday, ran out of time !)
* Package management
- packages are sets of rules, which are "baseline" versioned for deployment. This will provide a more technical view of the rule assets in a tree structure (so you can view rules either via categories, or packages). Need to make this as intuitive as possible with sensible defaults.

Comments.

Monday, January 01, 2007

Rules with no code - Michael Neale

Often you hear/read/see adds for tools (rules or workflow) that claim breathlessly "look ma ! no code" - "rules with out code" - giving control back to the business etc.

(if you haven't, then you obviously have a good marketing detector, and are able to mentally filter out marketing messages). Some products live up to this impossible claim more then others (and some a despicable lies, of course never in the rules community !).

An impossible claim? What did you say?

I say "impossible" in the sense of the definition of "Code" as it appears in the adds. If you take code to mean "ascii or UTF-8 files written in a textual programming languages with file extensions like .java, .c, .rb, .py, in an IDE or programmer focused editor" then I would say its not impossible. But what is "code" really? Lets presume it means a programming language (as opposed to "The Davinci Code"). What is a programming language? Basically symbolic instructions for a machine to understand that makes it do something (I am sure many folks can come up with better definitions). Who said these instructions had to take ascii form? a visual graph (a la jBPM, a JRules decision tree or a Corticon "rule sheet" for instance) could be thought of as "code" itself.

To some this may be irritating semantics, but to less technical people its important to understand what they are getting into. So I should clarify, even when you are using "no code" you are still using "a code" - its just a higher level sort. In many cases this is a Good Thing ! But people do need to still think logically, without ambiguity or woolly headed-ness - machines just will not tolerate it !

I have seen great demos of tools by Corticon (they use clever techniques with a visual decision table metaphor, but its more then a decision table), and I hear good things about Haley Adviser for natural language. I saw great demonstrations of Rule Burst's document based rule management, JRules supports multiple textual and visual rule metaphors with a myriad of smart editors. All really great tools of course, but in their own way, still "a code" is being authored, its just a code (programming language) that is higher level, and close to the domain and perhaps in a more natural or visual form then "ordinary code". You can't wave your hand at these tools and magically have consistent rules (maybe you can in the latest versions ;). You still need to be logical - the tools will do a lot of the heavy lifting, but precision is still required from you, the user, in your logic and intent, and design decisions.

To burst a few bubbles, no one will EVER have true free form natural language for rules. For starters, we don't have exhaustive technology to make computers understand natural language without a very very narrow scope. But MORE SIGNIFICANTLY, even if we did, we would still not have NL rules. Why? because our human languages are deeply flawed, in terms of logic. So even if we technically could have NL rules, other then a few spectacular (and possibly dangerous) failures they would be abandoned in favour of a controlled language of some form.

Have you ever given detailed instructions to a builder for your house renovations, yet still been disappointed? (ask Mark !). Natural language is not a language of logic, or accurate specification of instructions.

As a kid I used to earn pocket money by typing up papers for my father (who is a lawyer) and became familiar with various styles of legal language, legislation (as well as my fathers handwriting, which was much harder). They are worded in a very very formal way, yet fail to come even close to the accuracy of logic that symbolic programming languages provide (and they are not readable other then by experts) - most legislation needs to be tested in courts to be workable, it needs Explanatory Memorandums to patch up the gaping holes etc. This is not what people want when they talk about natural language rules, or "rules with no code".

In summary, whatever your tool of choice, you will still be using "a code" of sorts, and you will not be able to provide the vague sort of instructions to a rule document authoring system that you used to email to assistants, and hope it to work. That is not to devalue these tools at all, its just reality.


And happy new year ! Welcome to the world of tomorrow !

Comments.