[rules-users] How are rules imported into the knowledgebuilder?

Esteban Aliverti esteban.aliverti at gmail.com
Wed Jan 16 05:48:35 EST 2013


String rules = ".......";

KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newByteArrayResource(rules.getBytes()),
ResourceType.DRL);

You may also use .newInputStreamResource(), .newReaderResource() or
.newURLResource()

Best Regards,


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com


On Wed, Jan 16, 2013 at 11:33 AM, Bojan Janisch <
bojan.janisch at scai.fraunhofer.de> wrote:

> Hello everybody,
>
> the problem that I'm facing right know is,
> that I want to create rules from a program
> and (without writing it to file) loading it
> into the knowledgebuilder.
>
> So does anybody know how I can load a rule
> into the knowledgebuilder without using a
> file?
>
> Thanks to everyone who reads this.
>
> Bojan
> _______________________________________________
> 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/20130116/c38dd8f4/attachment-0001.html 


More information about the rules-users mailing list