Hi Esteban,
Thank you for your fast answer!
I am planning to integrate the Drools Eclipse plugin into an RCP
application (that will be used to create rules, but not only). Maybe I
am wrong but I would like to avoid using Guvnor that seems to be
complicated from a deployment point of view (an additional server into
our architecture). That's why I planned to build the KnowledgeBase
(based on the files generated by the Drools Eclipse plugin in my
application) and to fire the rules using the API.
I have the impression (but maybe it is just a consequence of my
inexperience) that Drools' API lacks some kind of "put the pieces
together" feature that would ease the KnowledgeBase building. Something
like a KnowledgeAgent that would take a directory as input, build DRLs
from BRLs + drools packages (expected next to BRLs), etc... I also have
the impression that the directory layout and file extensions could be
"enforced" (a bit like javac that expects .java files located in
directories corresponding to packages). There seems to be conventions
like that in Guvnor ("sub-directories" in packages containing technical
rules, business rules, dsls... rule "inheritance" from a parent package
to sub-package, and useful things like that) but they do not seem to
have any equivalent in the Drools' Core API. And that's exactly where I
am :-).
Anyway, I have tried adding the "drools.package" as a DRL into the
change-set... :
<add>
<resource source="classpath:misc/drools.package" type="DRL"
/>
<resource source="classpath:misc/KBuilder_Test.brl"
type="BRL" />
</add>
...but it does not work (I still get the "KnowledgeAgent has
KnowledgeBuilder errors object=Unable to resolve ObjectType..." error).
Best regards,
Bruno.
Esteban Aliverti a écrit :
Why are you trying to work with BRL format? This format is only used
to store rules in guvnor/eclipse and it is not prepared to be used in
any environment. The main problem is that BRL doesn't contain all the
information needed to be compiled. For example, it doesn't contain any
package nor import definition.
What you could try is to add a DRL in your change-set (before the BRL)
containing only the import statements. Could you please try it and
tell me the results?
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @
http://www.plugtree.com <
http://www.plugtree.com>
- Blog @
http://ilesteban.wordpress.com