0
votes

I am using Drools and I am very satisfied with it.

My question: Is it possible to add more than one Excel Decision Table to a KnowledgeBuilder and if "yes", how can I choose which rule should be executed? The API allows to add more resources, so it should be possible to add more than one Decision Table, but as far as I can see, there's just "fireAllRules" for the Drools session.. can I choose which rule table should be used? Or is this done automatically by Drools?

Thx in advance!

1

1 Answers

1
votes

Each decision table you add to the knowledge base generates a rule in that knowledge base for each row. So you can't exactly pick out a decision table to use. Your options for this are probably:

  1. Create multiple knowledge bases, each containing an isolated set of rules.
  2. Use agenda groups. You can set up each decision table to be associated with an agenda group. Then by defining in your code, which agenda group has focus, you can activate specific groups of rules. See the user manual for how to use those in decision tables.