You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "piacenti (via GitHub)" <gi...@apache.org> on 2024/12/14 00:27:05 UTC
[I] RuleUnit Running Rule From Different Rule Unit [incubator-kie-drools]
piacenti opened a new issue, #6197:
URL: https://github.com/apache/incubator-kie-drools/issues/6197
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
```mermaid
flowchart TD
Base --> RuleUnitX
Base --> RuleUnitY
```
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 every time but the problem doesn't seem to change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] RuleUnit Running Rule From Different Rule Unit [incubator-kie-drools]
Posted by "piacenti (via GitHub)" <gi...@apache.org>.
piacenti commented on issue #6197:
URL: https://github.com/apache/incubator-kie-drools/issues/6197#issuecomment-2566660819
The problem seems to go 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 at least for my case where each contain thousands of rules
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] RuleUnit Running Rule From Different Rule Unit [incubator-kie-drools]
Posted by "piacenti (via GitHub)" <gi...@apache.org>.
piacenti commented on issue #6197:
URL: https://github.com/apache/incubator-kie-drools/issues/6197#issuecomment-2565971733
I also see the same behavior with version 10.0.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [I] RuleUnit Running Rule From Different Rule Unit [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on issue #6197:
URL: https://github.com/apache/incubator-kie-drools/issues/6197#issuecomment-2597802719
@piacenti Could you please share a reproducer (= a simple maven project to reproduce the issue)? You wrote that your project is large, but you can reproduce the issue with a few rules.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org