With a stateless session you can modify a fact which you insert, or register a global which you update.
If you have a stateful session then there are a few more options:
Fetching fact from stateful session of drools
If you're looking for a general means of examining what existed in working memory during your stateless session,
StatelessKnowledgeSession ksession =
kbase.newStatelessKnowledgeSession();
TrackingWorkingMemoryEventListener listener =
new TrackingWorkingMemoryEventListener();
ksession.addEventListener(listener);
List<Object> facts = new ArrayList<Object>();
facts.add(myRequestFact);
ksession.execute(facts);
List<ObjectInsertedEvent> insertions = listener.getInsertions();
It's handy for debugging and audit purposes, but I wouldn't recommend it as a means of getting the actual results out of a request. Example code (by me) for a tracking WorkingMemoryEventListener can be found here: