Option 1 is to just use a stateful session – from my understanding there is pretty much no difference in terms of overhead.
The other option is to insert a ‘ResultsAccumulator’ object containing a resultList. I
If you don’t need to reason over your new Facts than rather than inserting them just add them to the result list.
Alternatively have a low salience rule which will only run at the end which accumulates up all the facts and adds them to the result list (either with accumulate or one by one).
Thomas
From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
On Behalf Of Ruault Gaetan
Sent: 06 July 2011 01:13
To: Rules Users List
Subject: [rules-users] get inserted facts
Hi,
I use drools in stateless Session like this :
session.execute( my_facts_list) ;
and i have many rules like this
when
Type1(filter1 =1)
Then
Insert( new Fact()) ;
Could you explain how it’s possible to retrieve my new facts in java code ?
Thanks.
Gaetan