apache / incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
http://www.drools.org
5.85k stars 2.49k forks source link

Executable model doesn't report an error when duplicated rule name with "include" kbase #6007

Closed tkobayas closed 2 months ago

tkobayas commented 3 months ago

Assuming "kjar-sub" has a rule name "RuleA" with a package "org.example" and "kjar-main" has the same rule name "RuleA" with the same package "org.example",

when "kjar-main" includes "kjar-sub":

<kmodule>
  <kbase name="kjar-main" includes="kjar-sub" />
</kmodule>

non-exec-model reports an error "Duplicate rule name" during build-time, but exec-model doesn't report an error and kjar builds are successful. "RuleA" is overridden by "kjar-sub"'s one.