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

Bruno Freudensprung bruno.freudensprung at temis.com
Mon Nov 22 05:07:15 EST 2010


Hi Toni,

Thanks a lot for your investigations. What I've noticed so far is: when 
you add a "drools.package" file in the KnowledgeBuilder (as a DRL 
resource), then add the BRL file in the KB (as a BRL), the KB has 
errors. When both are concatenated then added (as a DRL) it works well.
Best reagrds,

Bruno.

Toni Rikkola a écrit :
> Can't remember what the issue was with BRL back then. I can take a second look at the TODO next week.
>
> Toni Rikkola
>
> On Nov 19, 2010, at 2:26 PM, Bruno Freudensprung wrote:
>
>   
>> 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
>>>
>>>
>>>       
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>     
>
>
> _______________________________________________
> 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/20101122/57201510/attachment.html 


More information about the rules-users mailing list