[rules-users] Building a rule base from the content of a directory

Bruno Freudensprung bruno.freudensprung at temis.com
Fri Nov 19 07:26:52 EST 2010


Hi,

Many thanks for you answer!
Are you talking about DroolsCompilerAntTask and DroolsVerifierAntTask 
Ant tasks (that I discovered after having read you email)?

I've taken a look at the code of the DroolsCompiler task (Drools 5.1.1) 
and it also concatenates (into a single string) the package file and the 
BRL file (transformed into DRL) before adding it to the 
KnowledgeBuilder. The code comes along with the following comment:
            // TODO: Right now I have to first change this to String. 
Change to
            // use KnowledgeBuilder directly when the support for that 
is done.
            // -Toni Rikkola-

I really wonder if there is a more straighforward way to handle that 
"package file + BRL file" association. This is quite fair however 
compared to the following case:
the Drools RCP plugin enables to create "rule resources", either "rule 
packages" (a DRL file with package, import, globals...) in a single DRL 
file, or "individual rules" in a single DRL file as well. An "individual 
rule" seems to be kinda like a BRL file: something without any package, 
import, globals... and with one rule. The problem is I don't see a 
clever way (when listing the content of a directory) to make the 
distinction between "individual rules" and "rule packages".

For the moment I tend to think that, like in Guvnor UI, the solution is 
to have conventions (this directory contains "individual rules", that 
directory contains "rule packages", that one "business rules"...).

Bruno.


Justin Case a écrit :
> I'm happily using an Ant task for that - registered as Eclipse external builder. 
> But I don't feel it exactly like cutting edge...
> HTH,
> JC
>
>
>
>       
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>   




More information about the rules-users mailing list