You can use ObjectFilter
Collection<Object> myfacts = session.getObjects( new ClassObjectFilter(MyFact.class) );
Unfortunately, in Drools 5.5.0 Final, the resulting collection contains a method that does not work properly. Typically, the contains method returns true if the searched object is equal to something in the collection, but the Drool collection finds only objects that have the same link (== is used to compare objects).
source
share