jstastny-cz commented on code in PR #4229:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4229#discussion_r3108873621
##########
drools/kogito-dmn/src/main/java/org/kie/kogito/dmn/DMNKogito.java:
##########
@@ -96,4 +124,57 @@ public static KogitoDMNResult evaluate(DMNRuntime
dmnRuntime, String modelNamesp
return new KogitoDMNResult(modelNamespace, modelName,
evaluationResult.result);
}
+ static Optional<InputStream> getDMNModelStream(String path) {
+ logger.info("getDMNModelStream for {}", path);
+ InputStream toReturn = Application.class.getResourceAsStream(path);
+ if (toReturn != null) {
+ return Optional.of(toReturn);
+ } else {
+ logger.warn("DMN model stream not found in
Application.class.getResourceAsStream");
Review Comment:
Also here, from how I read this method, there are various "fallback" ways to
locate the resource, if each of the models produces 3 warn log messages, but
eventually succeeds, the warn logs are then not relevant really.
##########
quarkus/extensions/kogito-quarkus-decisions-extension/kogito-quarkus-decisions-integration-test/src/main/resources/application.properties:
##########
@@ -18,3 +18,4 @@
#
kogito.decisions.stronglytyped=true
+quarkus.log.category."org.kie.kogito".level=DEBUG
Review Comment:
Is this intended change or was just necessary during development?
##########
drools/kogito-dmn/src/main/java/org/kie/kogito/dmn/DMNKogito.java:
##########
@@ -96,4 +124,57 @@ public static KogitoDMNResult evaluate(DMNRuntime
dmnRuntime, String modelNamesp
return new KogitoDMNResult(modelNamespace, modelName,
evaluationResult.result);
}
+ static Optional<InputStream> getDMNModelStream(String path) {
+ logger.info("getDMNModelStream for {}", path);
Review Comment:
A bit concerned about the log level here, @gitgabrio you mentioned high
numbers of dmn models causing the problem - the logs will be very long, right?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]