[rules-users] New Questions about drools

Esteban Aliverti esteban.aliverti at gmail.com
Wed Mar 9 13:13:56 EST 2011


Hi,

*1) When rules are entered through the UI are they immediately added to the
rule base?*
I assume by UI you mean Guvnor. In Guvnor, each rule is defined inside a
package. When you create a new rule you must define the package where it
belongs. Guvnor doesn't create any kbase, you can see a package (in Guvnor)
like a DRL file split in different parts: the imports, the globals, each
rule, etc. So Guvnor is only in charge of maintain different versions of
that DRLs.

*2) Does the edit UI require code to define new entities and associated
metadata? *
If you need to use Domain specific entities in your rules (and I'm sure you
will), you have 2 different ways to define them:
1.- Declare the entities in Guvnor. This will use the "declare" keyword to
define a New Data Type.
2.- Upload to guvnor's package a .jar file containing your model.

*3) What would our interface look like if we called it as a service for only
rule evaluation? *
I didn't get this question. If you want to use your rules, you will need to
create an application that creates a knowledge base from one or more
resources (the packages hosted in Guvnor) and then creates a knowledge
session from it. You can then expose that session as a service.
Or you can use drools server which does exactly what I told you.

*4) What is the rule scoping mechanism. That is, how do I say "evaluate this
set of information against *
*ruleset Q"? *
One way to have different "rulesets" is to define different knowledge bases
containing different rules. If you are using Guvnor to store your rules, you
could have for example 3 packages A, B and C. Then, when you create a
knowledge base, you could select only the packages with the rules that you
need.
The evaluation takes place when you insert facts (objects) into a knowledge
session.

*5) I'm concerned about the "then" clause. It looks like it is always code.
If our "then" always consists of *
*assignments to some set of variables or parameters, what does the person
writing rules see?*
mmmh... He will see the assignments? :P


Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


2011/3/9 Carlos Santiago Moreno <ingcsmoreno at gmail.com>

> Hi There! I have been reading some more about Drools, Guvnor, and JBPM5,
> and I have a few new doubts, that I couldn't get solved from the
> documentation I read. And here they are:
>
> 1) When rules are entered through the UI are they immediately added to the
> rule base?
>
> 2) Does the edit UI require code to define new entities and associated
> metadata?
>
> 3) What would our interface look like if we called it as a service for only
> rule evaluation?
>
> 4) What is the rule scoping mechanism. That is, how do I say "evaluate this
> set of information against
> ruleset Q"?
>
> 5) I'm concerned about the "then" clause. It looks like it is always code.
> If our "then" always consists of
> assignments to some set of variables or parameters, what does the person
> writing rules see?
>
> 6) Can I define a new workflow and connect it into some dispatcher for
> invokation without writing any code and without stopping or upgrading the
> app?
>
> Thanks for your help.
>
> Carlos S. Moreno
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110309/6b70d121/attachment.html 


More information about the rules-users mailing list