[rules-users] creating .pkg from .drl

Amit Kumar amitkumar at gmail.com
Fri Apr 2 20:41:14 EDT 2010


Cool.. Thanks folks!

On Fri, Apr 2, 2010 at 3:48 PM, Ansgar Konermann <
ansgar.konermann at googlemail.com> wrote:

> On 03.04.2010 00:40, Amit Kumar wrote:
> > Hi Folks,
> >
> > I am trying to create a .pkg file (for probably faster loading) from a
> > .drl file
> >
> > Does anybody has a code snippet which I can use. Am unable to find it
> > in javadocs.
>
> Hi,
>
> from what we figured out at work, they're just plain serialized
> knowledge packages (or rather, collections thereof). IIRC, this is also
> described somewhere in the docs.
>
> So all you need to do is:
> - create the knowledge packages in-memory using the normal
> KnowledgeBuilder api calls (loads of documentation available for this)
> - use java object serialization to write a Collection<KnowledgePackage>
> into a file.
>
> Upon loading these packages, make sure all the classes used/imported in
> the *.drl files are available on the classpath, otherwise you probably
> won't be able to deserialize the packages.
>
> Kind regards
>
> Ansgar
>
>
> _______________________________________________
> 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/20100402/63145ab0/attachment.html 


More information about the rules-users mailing list