6

Is it possible to persist a Knowledge Session in Drools? If so, how? I have facts stored in a database and i'd like to avoid reloading all of them in a new session everytime a new fact is added. At the moment, when there's a new fact, the fact is stored in the database and then Drools is called: it loads all facts in its session and then fires the rules. The session is lost between calls.

Hendy Irawan
  • 20,498
  • 11
  • 103
  • 114
Spaffo
  • 621
  • 2
  • 8
  • 12

1 Answers1

3

Yes, you can persist sessions to any "binary stream", i.e., files, databases, your in-memory cache, etc. You can also use JPA to manage the persistence for you. Documentation:

http://docs.jboss.org/drools/release/5.4.0.Final/drools-expert-docs/html_single/index.html#d0e3799

Edson Tirelli
  • 3,891
  • 20
  • 23