Defining Pattern Matching Logic as Decision Tables - Gnorion/BizVR GitHub Wiki
Defining Pattern Matching Logic as Decision Tables
In this scenario we want the following three decision tables to work cooperatively:
- The first DT spits out orders
- The second finds pairs of orders for the same product and combines them
- The third removes orders that have been shipped
The key here is that the highest priority table (DT3) keeps executing until it runs out of things to do.
Then we continue executing the second highest (DT2) until the conditions for DT3 occur then we switch back to DT3.
So just like an Aion set of PM rules we may jump from table to table as the bindings come into and out of scope. Not all tables need to do this which is why these have the special “pattern matching” designation. This goes back to the roots of the old RETE inferencing algorithm.