Thursday, June 14, 2012

Oracle Business Rules: "Fact not found in the rule engine working memory" error

At run-time when you encounter the following error from a Business Rule component, more often than not, the reason/cause could be that there is no 'otherwise' branch defined in the business rule causing the business rules engine to throw this not-so-straight-forward error message.

Non Recoverable Business Fault :

Fact not found in the rule engine working memory, rule session execution failed. The rule session 130287 failed because an instance of the fact Response could not be found in the working memory of the rule session. This is most likely a rule modeling error. The decision service interaction expects the fact instance to exist in the working memory of the rule session. Check the rule actions in rule designer and make sure that a fact of the expected type is being asserted. If the error persists, contact Oracle Support Services.

Okay - Anyways the solution is to model the Business Rule for ALL probabilities!

It could be as easy as this - Just add the 'otherwise' rule to take a default action for cases where none of the rules match.

4 comments:

  1. Sathya,

    Thank you for you post. One quick question where do you add the otherwise rule inside rule Dictonary

    ReplyDelete
    Replies
    1. If it is a decision table, just add another column. Under the fact assertions, choose the default available "otherwise". Bottom line is to ensure that ALL conditions are modelled within the business rule.

      Delete
  2. I'm just getting into the business rules engine. Theres so much to learn! What are some of the main things to know as a beginner with no knowledge?

    ReplyDelete
    Replies
    1. Hi Sillowine, Appreciate your comments and interest in Oracle business rules. Oracle business rules engine is a lightweight product and is an integral part of the SOA offering. You can use the samples & demos to get yourselves familiarized with business rules. These are great headstart materials for a novice user:

      http://www.oracle.com/technetwork/middleware/business-rules/learnmore/index.html

      Hope that helps.

      Delete