The Drools 5 legacy adapter appears to be incomplete. Code snippet taken directly from the referenced class: public Agenda getAgenda() { throw new UnsupportedOperationException("org.drools.impl.adapters.StatefulKnowledgeSessionAdapter.getAgenda -> TODO"); } public WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String name) { throw new UnsupportedOperationException("org.drools.impl.adapters.StatefulKnowledgeSessionAdapter.getWorkingMemoryEntryPoint -> TODO"); } public Collection<? extends WorkingMemoryEntryPoint> getWorkingMemoryEntryPoints() { throw new UnsupportedOperationException("org.drools.impl.adapters.StatefulKnowledgeSessionAdapter.getWorkingMemoryEntryPoints -> TODO"); } public QueryResults getQueryResults(String query, Object... arguments) { throw new UnsupportedOperationException("org.drools.impl.adapters.StatefulKnowledgeSessionAdapter.getQueryResults -> TODO"); } public LiveQuery openLiveQuery(String query, Object[] arguments, ViewChangedEventListener listener) { throw new UnsupportedOperationException("org.drools.impl.adapters.StatefulKnowledgeSessionAdapter.openLiveQuery -> TODO"); }
Fixed by https://github.com/droolsjbpm/drools/commit/6dc7605db
This was not included in CR1, I have cecked the commits and it is included in latest sync, that will be used as CR2. I'll verify the issue again then.
There are still 4 methods unimplemented in the KnowledgeRuntimeAdapter. Namely registerChannel() and getChannels() - ironically unregisterChannel() method is implemented. Then there are register/unregisterExitPoint() that use deprecated ExitPoint class may not be supported any more, but there should be better message than "org.drools.impl.adapters.StatefulKnowledgeSessionAdapter.registerExitPoint -> TODO"
Fixed by https://github.com/droolsjbpm/drools/commit/fed0365eb08af0041aef97d95ca08adfae1701bf
This no longer has a target release of 6.0.0.
The code is complete and all methods implemented now. Verified in BRMS.6.0.1.ER1