Improve Import Resolver logic #1383
Labels
area:dmn
Related to DMN
area:engine
Related to the runtime engines
type:tech-debt
Things that were left behind an may harm us in the future.
Follow-up of #1150.
After the analysis of that part of the code, several improvements should be applied:
drools:modelName
attribute is used in the logic. That attribute is a custom definition (i.e. not present in the DMN specs) no longer used in our implementation since DMN 1.1 version. Considering that the XSD that defines that attribute is no longer present in our codebase, the only reference of that attribute is present in the 1.1TImport
class, and our editors are not managing it at all, we agreed to remove any reference to that attribute in the logicnamespace
only to resolve the imported DMN file. Thenamespace
of the Definition metamodel doesn't ensure this attribute is unique over all DMNs of the entire project, so a collision may happen.In addition, the Import metamodel paragraph says:
The namespace value should be globally unique
, which in our interpretation doesn't force all thenamespace
to be unique but the required conditions to have a correct import resolution, without saying how to manage a possible collision.In case of collisions (i.e. multiple DMN files with the same namespace in the Definition metamodel), the idea is to rely on the
locationURI
attribute to correctly resolve the DMN model to be imported. ThelocationURI
is optional, so the logic should manage such a scenario as well.DMNResource
andDMNModel
DTOs have a very similar scope and fields. It seems the first one holds DMN files not yet compilated, while the latter is managing the already compilated ones. It could be possible to unify those DTOs - TBA@gitgabrio
The text was updated successfully, but these errors were encountered: