0

I want to use a rule engine to centralize business rules. My rules require information not typically owned by systems that call the rules engine.

I don't want to complicate these systems (System A and System B) by having them fetch data from a datastore, and I don't want to customize the rule engine to source data directly from the datastore because the rules engine is a COTS product and difficult to extend.

I'm thinking about adding an intermediary service to ensure calls to the rule engine contain enough information for the rules engine to make decisions.

Is there an existing software design pattern similar to the below? I'd like to refer to a pattern to look at the pros and cons and any gotchas.

+-------------+
|       System A
|             +------------------+
|             |                  |
+-------------+                  |
                                 |
+-------------+           +------v------+          +-------------+
|       System B          |             |          |             |
|             +-----------> Interceptor +---------->  Rule Engine|
|             |           |             |          |             |
+-------------+           +------+------+          +-------------+
                                 |
                                 |
                                 |
                           +-----v------+
                           |            |
                           |   Data store
                           |            |
                           +------------+
LazyCoder
  • 607
  • 4
  • 11
  • 2
    Does this answer your question? [Choosing the right Design Pattern](https://softwareengineering.stackexchange.com/questions/227868/choosing-the-right-design-pattern) – Bart van Ingen Schenau Feb 19 '21 at 07:13
  • I think you want something like the [Chain of Responsibility Pattern](https://refactoring.guru/design-patterns/chain-of-responsibility) – Sebastian Sotto M. Feb 20 '21 at 15:45

0 Answers0