Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DROOLS-7635] ansible-rulebook : Raise an error when a condition comp… #123

Merged

Conversation

tkobayas
Copy link
Collaborator

…ares incompatible types

  • don't miss to populate ruleSetName when runtime is used

…ares incompatible types

- don't miss to populate ruleSetName when runtime is used
@tkobayas tkobayas force-pushed the DROOLS-7635-error-incompatible-type-03 branch from 92493be to 2d46c3a Compare October 23, 2024 06:06
setCondition(anisbleRule.getCondition());
}
private void updateContextFromRule(org.drools.ansible.rulebook.integration.api.domain.Rule anisbleRule) {
setRuleSetName(anisbleRule.getRuleSetName());
Copy link
Collaborator Author

@tkobayas tkobayas Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ruleSetName needs to be populated here. Previously, it was set in toExecModelRules, but runtime engine (AstRulesEngine, AsyncAstRulesEngine = used by drools_jpy) may call rulesSet.hasTemporalConstraint and rulesSet.hasAsyncExecution earlier and they create operator instances, so ruleSetName was null in an error log.

There are several ways to bring ruleSetName, but having rulesetName in Rule seems to be clean and easy to understand.

@tkobayas
Copy link
Collaborator Author

@mariofusco This is a fix for an issue I found with drools_jpy (RuleSetName is null in an error message). Please review, thanks!

@mariofusco mariofusco merged commit a840c07 into kiegroup:main Oct 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants