ChinchuAjith commented on code in PR #6267:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6267#discussion_r2007220086


##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/DMNImportsUtil.java:
##########
@@ -130,4 +141,123 @@ public static ImportType whichImportType(Import 
importElement) {
                 return ImportType.UNKNOWN;
         }
     }
+
+    /**
+     * Method to resolve the dmn models based on the import type
+     * @param i : object of the Import interface which represents an imported 
resource in a DMN model
+     * @param dmnModels : List of decision models
+     * @param model : represents a DMN model, which includes all the necessary 
components like decision tables and other elements defined in the DMN standard.
+     * @param toMerge : This is a list that will hold DMN models that are to 
be merged later
+     */
+    static void resolveDMNImportType(Import i, Collection<DMNModel> dmnModels, 
DMNModelImpl model, List<DMNModel> toMerge) {
+        Either<String, DMNModel> resolvedResult = 
DMNImportsUtil.resolveImportDMN(i, dmnModels, (DMNModel m) -> new 
QName(m.getNamespace(), m.getName()));
+        DMNModel located = resolvedResult.cata(msg -> {
+            MsgUtil.reportMessage(LOGGER,
+                    DMNMessage.Severity.ERROR,
+                    i,
+                    model,
+                    null,
+                    null,
+                    Msg.IMPORT_NOT_FOUND_FOR_NODE,
+                    msg,
+                    i);
+            return null;
+        }, Function.identity());
+        checkLocatedDMNModel(i, located, model, toMerge);
+
+    }
+
+    /**
+     * Method to import the dmn model to the default namespace

Review Comment:
   Changed to this - "This method checks if a DMNModel is located and processes 
it by setting the import alias or merging it with the original model."



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

Reply via email to