[rules-users] Looking for guidance / approach to porting a question graph to Drools

tim fulcher against.entropy at googlemail.com
Thu Aug 27 18:49:58 EDT 2009


Hi

Making no bones about it, this is a broad topic request and I've got
little hands-on Drools experience, just looking for some pointers on a
potential Drools approach, feedback appreciated.

Background:
We have a system which asks online users questions to diagnose an
issue (the problem domain isn't important right now).
The questions are structured in a tree/graph such that one question
leads to another until a conclusion - not exactly rocketscience to
this list I suspect! Any question will have n outputs (defined in
configuration); each output is mapped to an option in an HTML
select/radio button.

The key issue though is that this question flow is all running in the
browser, by reading in an XML configuration and parsing this in
javascript. Instead I need this executing server side, i.e. in a rule
engine. One reason is that increasingly questions are being automated
- currently we make an ajax call which decides upon the outcome to
select and therefore move onto the next. This is however a little
clunky at present.

I see Drools as a potential execution engine for our reworked system,
running rules until needing a manual question to be asked, and
triggering question display in a page. Upon the answer the flow
continues in that fashion until a conclusion is reached.

Specific queries:

We have a legacy stack of question flows, how to adapt them into a
syntax amenable to Drools? Can I do this at runtime?
( Our question graphs could be accessed via database access or in an
XML format )

Given many questions have >2 outcomes, I assume each question-answer
permutation would be a rule?

Does every question have to be mapped to a bean to become a fact to
operate on? Given our questions are of a few broad types
(boolean,numeric,select one) is that all I need to model?

In our current setup a user could decide to re-answer an earlier
question and therefore take an alternate route. What would be the
equivalent in Drools?

If this is viable, will I need 1 rule outcome to pose a question and
another to operate on the outcome, i.e. will the rules fire up
to/including the decision to ask a question, then when an answer fact
is injected into working memory the rules will fire from that point
onwards?


Thanks

A:E



More information about the rules-users mailing list