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 7742801
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:22:09+00:00 2026-06-01T09:22:09+00:00

This should be simple, but I am still lost. There is a very similar

  • 0

This should be simple, but I am still lost.
There is a very similar post here: How to share data between Drools rules in a map?
but it doesn’t fix my problem:

I have a set of rules and, before launching them, I insert a Map<String, Object> as a fact.
In these rules I use the map to write some conclusions like:

when
   $map : Map();
   something ocurrs;
then
   $map.put("conclusion1", 100);

Now I would like to use these intermediate conclusions in other rules, something like:

when
   $map : Map(this["conclusion1"] > 50)
then
   do something cool;

The problem is that when I execute the rules it is like the second rule doesn’t see the conclusions of the first one, and it does not fire.
I have tried putting a break point and analysing the working memory, and, in fact, the Map would contain the conclusion1, 100 after the first rule is fired.
I have also tried by making an update($map) in the conclusion, but that would trigger an infinite loop.

Any idea of why this wouldn’t work, or any alternative solution to my problem?

Thanks !

  • 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-01T09:22:10+00:00Added an answer on June 1, 2026 at 9:22 am

    When you modify a fact you need to notify the engine you are doing so. One of the ways of doing that is by using modify(). E.g.:

    when
       $map : Map();
       something ocurrs;
    then
       modify( $map ) { 
          put("conclusion1", 100)
       }
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be relatively simple for the MVC experts out there, but I'm still
This should be simple but I cannot figure it out. I have this very
This should be simple, but pointers to char arrays still leave me scratching my
Ok this should be really simple, but I am doing my head in here
OK, so this should be simple... But I still can't figure it out. I
This should be simple enough, but after wrestling with it for hours, I still
I think this should be simple but I am having some difficulty implementing it.
This should be simple task but i am not been able to find the
This should be totally simple but I can't get it working no matter what
This should be a simple issue but I can't figure this out. I have

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.