Packages in Guvnor (and Drools for that matter) are just containers to collate related things.

A package compiled within Guvnor will contain all assets within the package, and only that package: no inheritance etc.

The fact that a package name is its parent's name plus some suffix (e.g. parent.child) has no significance to Guvnor (or Drools).

How you want to use packages to bundle your rules is up to you really. You might prefer to split as you have based on vehicle type, however you might equally find one package holding rules that change infrequently (e.g. rules relating to taxation etc) and another holding frequently changing rules (e.g. weather conditions). You could then build and deploy the frequently changing rules without fear of affecting the infrequently changing rules.

With kind regards,

Mike

On 7 January 2013 20:03, dunnlow <dunnlow@yahoo.com> wrote:
I've been using Guvnor for a while (on v5.4) now.  However, I've always had
everything in one "package."  As my project grows however I am looking to
improve the organization of my assets - it is getting harder and harder for
me to find in Guvnor the rule I am looking for.  As I looked into this it
occurred to me that I don't really understand the concept/purpose of a
package.

For example, I have a main package,   "Auto" that contains generic
rules/assets for automobiles.  I have assets specific to types of autos, so
I created packages "Auto.Compact" and  "Auto.Sedan".  Those packages are
created neatly under the Auto Package.  However, when I looked at the source
for Auto, I expected to see the source for assets in Auto, Auto.Compact and
Auto.Sedan, but it only contains the source for Auto (rather than having
them rolled up).

I'm a java developer, so I expected the same sort of "package"
functionality; all of the sub packages being contained within the main
package.

FYI, I have a drools server that connects to Guvnor to obtain/create the
most recent rule base.

I have Drools Dev Cookbook, and looked through the online guide, but didn't
really find anything to help.
Can anyone explain to me the purpose/intention of a package (or point me to
some good documentation about it).

Any best practices out there on how to organize assets.

Thanks very much,
-J




--
View this message in context: http://drools.46999.n3.nabble.com/How-do-you-use-packages-in-Guvnor-tp4021386.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users