How to configure Rule Deployment so every request will produce new KieSession?
Issue
Consider simple rule project with just one guided decision table which takes a name and returns a nickName - this project was deployed with "PER_PROCESS_INSTANCE" runtime strategy.
This deployment was then registered in the Kie Decision Server.
Since it was deployed with "Per Process Instance" we are expecting to see a different session each time a fact was inserted / rule fired - but instead, same KieSession ID is being observed across multiple requests. How to explain this behavior?
11:53:00,706 INFO [org..TestRuleRuntimeEventListener] (http-localhost/127.0.0.1:8080-3) Rule object Inserted org.Bean1@18d89d3 Fact Count : 1
11:53:00,706 INFO [org..TestRuleRuntimeEventListener] (http-localhost/127.0.0.1:8080-3) KieRuntime: org.drools.core.impl.StatefulKnowledgeSessionImpl@3ae395KieSession size: 1
11:53:00,706 INFO [org.TestRuleRuntimeEventListener] (http-localhost/127.0.0.1:8080-3) KieSession: org.drools.core.impl.StatefulKnowledgeSessionImpl@3ae395KieSession id: 0
11:53:10,458 INFO [org.TestRuleRuntimeEventListener] (http-localhost/127.0.0.1:8080-3) Rule org.Bean1@11a5720 Fact Count : 2
11:53:10,458 INFO [org.TestRuleRuntimeEventListener] (http-localhost/127.0.0.1:8080-3) KieRuntime: org.drools.core.impl.StatefulKnowledgeSessionImpl@3ae395KieSession size: 1
11:53:10,458 INFO [org.TestRuleRuntimeEventListener] (http-localhost/127.0.0.1:8080-3) KieSession: org.drools.core.impl.StatefulKnowledgeSessionImpl@3ae395KieSession id: 0 // same ID !
Environment
- Red Hat JBoss BxMS
- 6.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.