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
We have defined the rules by extending the CoRRuleBook as below and created the bean using SpringAwareRuleBookRunner. When executing the rule, results are set as null. Within the CoRRuleBook, results was set as expected but AbstractRuleBookRunner was not considering the results.
public class TestRuleBook extends CoRRuleBook<String> {
@Override
public void defineRules() {
addRule(
RuleBuilder.create()
.withFactType(ValidationRequest.class)
.withResultType(String.class)
.when(InsertIdRuleBook::isInvalid)
.then((facts, result) -> result.setValue("Invalid")))
.build());
}
}
@Configuration
public class ApplicationConfig {
@Bean
RuleBook testRuleBook() {
return new SpringAwareRuleBookRunner(
TestRuleBook.class, "package name");
}
}
Is SpringAwareRuleBookRunner only supports the POJO rules? Is there a way to execute the CoRRuleBook rules using runner class?
The text was updated successfully, but these errors were encountered:
Hi,
We have defined the rules by extending the CoRRuleBook as below and created the bean using SpringAwareRuleBookRunner. When executing the rule, results are set as null. Within the CoRRuleBook, results was set as expected but AbstractRuleBookRunner was not considering the results.
Is SpringAwareRuleBookRunner only supports the POJO rules? Is there a way to execute the CoRRuleBook rules using runner class?
The text was updated successfully, but these errors were encountered: