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(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users