You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "jstastny-cz (via GitHub)" <gi...@apache.org> on 2026/04/20 07:23:01 UTC

Re: [PR] [incubator-kie-issues#2253] Replace instantiation of streams inside generated DecisionModels with creation of modelPaths.txt file that is parsed at DMNRuntime instantiation [incubator-kie-kogito-runtimes]

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: 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