0
votes

I'm really new to the drools environnement, and try to understand it.

I've done a first java project which basicaly parse a drl rules files, apply them to a java object and output a result according the object properties and the rules. Stop me if I'm wrong, but I think it's the ultra-basics of drools.

My second step was to use a decision table (xls) : I compiled it to a drl file and used it. It works.

Now, I'm looking for a tool allowing to manage xls, compiling them live to drl. I was thinking it was the aim of the drools Workbench (old guvnor) so I installed it(yes I succeeded ;-) ). With the help of http://docs.jboss.org/drools/release/latest/drools-docs/html/wb.Workbench.html#wb.Installation , I created a new project containing my model, my drl, and I deployed it...

->But now, I'm not really clear about the next steps : there is a maven repository, but what does it contain?

->Was I'm thinking right that the workbench could allow me to dynamicaly compile my xls to drl?

->Do I missed a point about the workbench?

1

1 Answers

0
votes

(The question invites being closed as its answers will be "primarily opinion-based". But it has been around for 10 hours no without a single vote for close, so I'll just answer it, based on my opinion and my experience. YMMV.)

Regarding maven, it is of course the prime choice as a build tool for Java applications in general, and Drools supports this very well. OTOH, you may write a non-trivial application in, say, Eclipse, compile your rules offline, use simple jar building step for .class and serialized packages or rule base and deploy that. The development process of your institution will have its say, or you take your pick.

The foremost intent of Drools Workbench is to make rule programming viable for, well, hum, non-programmers. I have already unveiled myself as an orthodox believer in the dogma that, except for the mechanic parts, programming remains an "art" (D.E.Knuth), a "discipline" (E.W.Dijkstra) and a "science" (D.Gries). There is nothing wrong with entering the ingredients for a Java Bean via some GUI (provided you have learned the basics about data types including collections), although doing the equivalent in a modern IDE isn't really difficult. Composing rules, conditions and consequences, in a GUI is where I begin to have my doubts. You'll need a full understanding of the underlying principles anyway, and switching between code items in a GUI is for me highly inconvenient in comparison to seeing them (with syntax highlighting and all) all in a modern code editor, with its search and replace and refactoring possibilities.

A last word on the XLS decision table. While many see this as a strong point in favour of Drools, I always add the warning that its unreflected use leads to an abuse of rules as a collection for sets of literals, with uniform logic throughout, something which is much more efficiently represented by a collection of facts and a single rule.

No doubt, others may have to say more in favour of the workbench - not that I'm completely blind to its advantages either ;-)