KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieSession kSession = kContainer.newKieSession("ksession-rule");
So here i do not want to use " kContainer.newKieSession("ksession-rule"); " to read drl.I have the rules in String i.e. String drl="Rules";
So what should i do for that ??
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/f4d9db70-4c75-42e3-89a7-49b456d6404b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MarioRegards,If you have your drl code in a Java String the quickest thing to do to create a KieSession out of it is using the KieHelper as it follows:Note however that the KieHelper is not in drools public API and the it may be subject to change without any warning.
String drl = ... // your drl is here
KieSession ksession = new KieHelper().addContent(drl, ResourceType.DRL).build().newKieSession();
On Wed, Sep 13, 2017 at 9:37 AM, Adarsh22X22Singh <adarshs...@gmail.com> wrote:
KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession("ksession-rule");So here i do not want to use " kContainer.newKieSession("ksession-rule"); " to read drl.I have the rules in String i.e. String drl="Rules";So what should i do for that ??
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/2fda10be-d85d-4867-8bf2-70986aa80bbb%40googlegroups.com.