You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where when running RuleUnit X it evaluates a rule from RuleUnit Y. When I run RuleUnit Y the same rule fires again so I end up with some duplicate data. The project is large so it would be hard to share the scenario. The generated LambdaPredicates predicateInformation method does mention rules from both rule units as consumers of that logic which includes the impacted rule. The odd thing is that the reverse doesn't happen. Evaluation of RuleUnit Y for that specific rule doesn't cause an evaluation of the RuleUnit X rule that uses that same logic. I've seen this issue for a few rules at this point. I am having to use from statements in those rules to deal with things I can't with OOPath, generally related to heavily dependent on methods logic.
I'm using Drools version 9.44.0.Final. Also RuleUnit X and RuleUnit Y both share the same model so they are implemented as a base class that contains all the store fields and the individual units simply extend that base
flowchart TD
Base[Base Implementing RuleUnitData] --> RuleUnitX
Base --> RuleUnitY
Loading
hence the very similar logic for a certain condition across units.
Edit:
The details around logic shared between rules of different units was just speculation. However, I found a rule that is having the same behavior which shares no logic with any other unit and yet it fires when evaluating a unit it doesn't belong to. Could sharing DataStores between units cause this? I've tried recreating them with new instances every time but the problem doesn't seem to change.
When I look into the elements of the InternalAgendaGroup to be evaluated for RuleUnit X I see many rules for RuleUnit Y listed so something seems to be wrong with the instance creation process.
The text was updated successfully, but these errors were encountered:
The problem goes away if I separate each drl rule unit file into a separate maven module for separate builds. So it seems something is not quite right when processing multiple rule unit drl files in the same folder in the same project at least for my case where each contain thousands of rules.
Also I found that trying to do multiple executions of the plugin each to deal with one of the affected drl files simply doesn't work. It seems that the kie-maven-plugin ignores configurations specifying resource folders to scan and instead use a hard coded static final String RESOURCES_ROOT = "src/main/resources/"; in the KieBuilderImpl class
I have a situation where when running RuleUnit X it evaluates a rule from RuleUnit Y. When I run RuleUnit Y the same rule fires again so I end up with some duplicate data. The project is large so it would be hard to share the scenario. The generated LambdaPredicates
predicateInformation
method does mention rules from both rule units as consumers of that logic which includes the impacted rule. The odd thing is that the reverse doesn't happen. Evaluation of RuleUnit Y for that specific rule doesn't cause an evaluation of the RuleUnit X rule that uses that same logic. I've seen this issue for a few rules at this point. I am having to usefrom
statements in those rules to deal with things I can't with OOPath, generally related to heavily dependent on methods logic.I'm using Drools version 9.44.0.Final. Also RuleUnit X and RuleUnit Y both share the same model so they are implemented as a base class that contains all the store fields and the individual units simply extend that base
hence the very similar logic for a certain condition across units.
Edit:
The details around logic shared between rules of different units was just speculation. However, I found a rule that is having the same behavior which shares no logic with any other unit and yet it fires when evaluating a unit it doesn't belong to. Could sharing DataStores between units cause this? I've tried recreating them with new instances every time but the problem doesn't seem to change.
When I look into the elements of the InternalAgendaGroup to be evaluated for RuleUnit X I see many rules for RuleUnit Y listed so something seems to be wrong with the instance creation process.
The text was updated successfully, but these errors were encountered: