Description of problem: When using StatelessKieSession constructed from KieContainer.newStatelessKieSession(), it is not possible to instantiate DRL declared facts in Java (or use other operations which require access to KieBase). To be able to do this, you need to use methods from the same KieBase, which was used to construct the StatelessKieSession. In case of (stateful) KieSession, there is a method KieSession.getKieBase() which provides you access to such KieBase. However, in case of StatelessKieSession, no such method is available. When using StatelessKieSession injection through CDI, this problem might require solution such as injecting KieBase instead of a StatelessKieSession and calling kieBase.newStatelessKieSession() to create the KieBase. Version-Release number of selected component (if applicable): Drools 6.0.0-SNAPSHOT Drools 6.0.0.CR1 We have discussed with etirelli that adding a new method in the public API would be possible even at this time.
I added the getKieBase() method to the StatelessKieSession interface.
Verified on BRMS 6.0.0.ER3.