You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2025/07/17 10:00:13 UTC
Re: [I] REST endpoints are not generated when declaring a rule unit in DRL [incubator-kie-drools]
tkobayas commented on issue #6384:
URL: https://github.com/apache/incubator-kie-drools/issues/6384#issuecomment-3083432179
Yes, only queries which have no argument generate REST endpoints.
https://github.com/apache/incubator-kie-drools/blob/10.1.0/drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/RuleUnitWriter.java#L120
```
List<RuleUnitQueryWriter> queryWriters = pkgModel.getQueriesInRuleUnit(ruleUnitDescr).stream()
.filter(query -> !query.hasParameters())
.map(query -> new RuleUnitQueryWriter(pkgModel, ruleUnitDescr, query))
.collect(toList());
```
The generated REST endpoints are intended for convenience and not suited for complex use cases. When having arguments, please write your own REST endpoints. Thanks!
--
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