I have the following use case: There are many (let's say 10000) accounts and each account (which can be identified by an id) should have its own set of rules. The rules of different accounts could contradict each other. For performance reasons it would be ideal if a new fact (which I know is only relevant to account xyz) would only be checked against the rules of account xyz.
Now as to my little understanding of drools there is only one rule space and one fact space for everything. Is that correct? That would mean I would have to make special rules for each account like
rule "rule 1 for account xyz"
when
$acc: Account(id == "xyz")
<more conditions go here>
then
$acc.doSomething();
end
This would result in tons of rules and probably slow execution. Can you please give me a hint how to handle this use case in an efficient way?