Yes the PackageDescr object has a package name property which is where the name lives. Not sure if you can easily get that from PackageBuilder, but if you go a little more low level, you can use DrlParser to get PackageDescr yourself, and there you go (peek at the PackageBuilder source code if you need more hints).

On 1/12/07, Justine Hlista <justine@vsasset.com> wrote:
Ah -- that was the problem, I was using a new packagebuilder each time (d'oh)!

But that brings up another thing...in some cases, I may want the rules source for a given package to be spread across multiple drl files. (I know the convention is to have everything from the package in a single drl file,  but for management and organization we may need to spread across multiple drl files). In order to add drls to an existing package, I have to be able to get the package name from the drl to look up a hashed builder. Is there any part of the public API, e.g from the antlr parser, that might help me with that? I have a very inefficient workaround at the moment, but if I could get to the parse interface, I might be able to make it better.

Thanks,
Justine



On 1/12/07, Michael Neale <michael.neale@gmail.com > wrote:
If you use the one packagebuilder, and you add the source first from the one with the function, and then the others, yes that should work just fine !


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users