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

Bruno Freudensprung bruno.freudensprung at temis.com
Wed Nov 3 11:55:46 EDT 2010


Hello,

Sorry for the duplicate post, the previous one got inserted into another 
thread (also sorry for that). So here it is... in its own thread :-).

I plan to use the Drools Eclipse plugin in order to create rules with 
both the "Guided rule" editor and the "Rule resource" editor, and I 
would like to write a rather "generic" piece of code (using a 
KnowledgeBuilder) in order to setup a KnowledgeBase from the rule files 
contained in a directory.

Would you say that am I completly re-inventing something that already 
exists? If not, is there is a convention related to building a rule base 
from a directory containing a mix of Drools files (drools.package, BRL, 
DRL...) created with the Drools Eclipse plugin?

My first experiments showed that, in a directory containing only a BRL 
file and its associated "drools.package" file:

    * If I add both the "drools.package" file (as a DRL resource), then
      the BRL file (as a BRL resource) into the KnowledgeBuilder, I get
      a compilation error telling "Unable to resolve ObjectType 'Document'"
    * If I concatenate the content of the "drools.package" file and the
      result of the "BRL 2 DRL" conversion into a single DRL file, then
      add that unique DRL file (as a DRL resource) into the
      KnowledgeBuilder, everything is fine.

Does any of you have an idea where I am mistaken?
Many thanks in advance,

Best regards,

Bruno.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20101103/a970d7c8/attachment.html 


More information about the rules-users mailing list