Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9146599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:47:15+00:00 2026-06-17T10:47:15+00:00

(I am a bit new to working with Drools, so please excuse if this

  • 0

(I am a bit new to working with Drools, so please excuse if this is a simple question).

I would like to use Drools for reactive execution of rules, this means we could consider the “facts” being inserted to be “event” instances. However, I want this to execute in a way that rules can be fired as soon as events are received. But, in the case that a rule may depend on several events, how can I configure the Working Memory, to remember previous events. Consider a very simple example:

Say I have the following rules:

 - when (E1) do A1
 - when (E2) do A2
 - when (E1,E2) do A3

Then, if time progresses as follows, I want to following rules to be fired, example:

 - t=1 , E1 happens => A1 fired
 - t=2 , E2 happens => A2 fired + A3 fired

The problem I have is if I call ksession.fireAllRules() after every insertion, the working memory will forget all previous events. What is the best way to achieve what I want?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:47:16+00:00Added an answer on June 17, 2026 at 10:47 am

    as long as you use a Stateful Knowledge Session, what you are probably doing because the stateless one has no fireAllRules() method, the WM will not forget all the inserted facts.

    What you express as “E1 happens” should be ksession.insert(E1);

    You may play with the example given in the documentation (link above)…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, please excuse me as I am a bit new to this
I'm a bit new to Rails/RSpec/Capybara, so this is probably a newbie question, but
I am a bit new to using multi-files. I have this very simple code
I'm a bit new to C++ but this should be really simple for someone
I'm reasonably new to working with XML schemas, so excuse my incompetence if this
I have been working with simple linq2sql statements for a bit but am new
I'm a bit new to vb.net and used to working in perl, this is
I tried including the relevant bit. I'm new at this and working with existing
I am bit new to C#. I am working on a Database application and
I'm a bit new to wordpress plugin coding. I've been working on a plugin

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.