How to retract facts when there are multiple entry points defined ?

Solution Verified - Updated -

Issue

  • When multiple entry points are defined in the drool rule, retracting fact from the working memory ends up in following exception:
Caused by: org.drools.FactException: Update error: handle not found for object: Hello. Is it in the working memory?
    at org.drools.base.DefaultKnowledgeHelper.getFactHandle(DefaultKnowledgeHelper.java:183)
    at com.lgim.eai.brds.Rule_Test_1_0.defaultConsequence(Rule_Test_1_0.java:12)
    at com.lgim.eai.brds.Rule_Test_1_0DefaultConsequenceInvoker.evaluate(Rule_Test_1_0DefaultConsequenceInvoker.java:27)
    at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:906)
    ... 7 more

Environment

  • Drools 5.2.0.BRMS

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content