[rules-users] Drools-server and fact-IDs - emptying/resetting stateful sessions

flo florian.geiselhart at uni-ulm.de
Sat Nov 27 18:03:32 EST 2010


Hello,

I'm currently working to setup a experimental drools decision service with
the drools-server component via REST. In the server, I run a stateful
session with rules from a guvnor repo. The stateful session absolutely needs
to stay stateful because I use some of the CEP features in my rules.
What I try to achieve at the moment is to "clean up" this session if my
client (there is just one single client)(re-)connects. That basically means
either to clear out the working memory by doing some retracts, or to reset
the whole server.

So, my first approach was a get-objects command to get handles to all
objects in the working memory (to retract them one after another), but soon
I discovered that the get-objects result doesn't provide fact-ids for its
results. As it seems, the same also applies to queries. But without fact-id,
no retracts can be made.

My second approach to reset the whole session or server also failed, because
there is no dedicated command for this and I'm not enough into java app
server stuff to implement something like that on the fly. But this solution
would also have the advantage that the rules would get reloaded after the
reset, which would really simplify things (as the resource change scanner
obviously doesn't work with guvnor and drools-server - at least I didn't get
it to work, and as it seems the problem is also know on this list).

So my question is - does someone know either how to reset the whole
drools-server via REST or alternatively a possibility how to gather all
facts in the WM with their corresponding fact ids?

Thanks for your help, really appreciate it!
Best regards,
flo
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-server-and-fact-IDs-emptying-resetting-stateful-sessions-tp1979515p1979515.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list