private Map<Object, KieSession> kieSessionMap = new HashMap<>();
public void ruleMethod(A a) {
KieSession kieSession = null;
if (kieSessionMap.get(Thread.currentThread()) != null) {
kieSession = kieSessionMap.get(Thread.currentThread());
} else {
kieSession = sortingWeightageKB.newKieSession();
kieSessionMap.put(Thread.currentThread(), kieSession);
}
for (RuleFactor ruleFactor : ruleFactors) {
kieSession.insert(ruleFactor);
}
kieSession.fireAllRules();
for (FactHandle factHandle : kieSession.getFactHandles()) {
kieSession.delete(factHandle);
}
}--
You received this message because you are subscribed to a topic in the Google Groups "Drools Usage" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-usage/-6iGRyrCr8M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-usage...@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/a0095872-4ba3-4e6a-b609-012540f1f5e9%40googlegroups.com.
kieContainer = kieServices.newKieContainer(releaseId);
return kieContainer.newKieSession(KIE_SESSION_ID);
kieContainer = kieServices.newKieContainer(releaseId);
kieEnvironment = kieServices.newEnvironment();
kieSessionConfiguration = kieServices.newKieSessionConfiguration();
return kieContainer.newKieSession(KIE_SESSION_ID, kieEnvironment, kieSessionConfiguration);
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/5598f145-3b51-4d37-a57d-25e6799d8144%40googlegroups.com.
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 view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/c4f0ee83-64fd-45a4-ae70-25cc3b5097b0%40googlegroups.com.
Is the above suggested issue fixed ???
Thanks
Dhiva