eclipse-esmf / esmf-aspect-model-editor

Manage Aspect Models visually — create, validate, create artefacts, persist file based
https://eclipse-esmf.github.io/ame-guide/introduction.html
Mozilla Public License 2.0
21 stars 7 forks source link

[BUG] Load model with externally linked property #44

Closed bs-jokri closed 1 year ago

bs-jokri commented 1 year ago

Describe the bug The editor allows to import properties from models in the workspace. Such models are also validated with the CLI. However, the editor cannot load such models anymore but fails with an "Instantiator Error".

The error can be seen eg in model https://github.com/eclipse-tractusx/sldt-semantic-models/pull/138/files

Where Problem occurs in Aspect Model Editor v4.2.1 and v4.3.0

Screenshots

image
bs-jokri commented 1 year ago

@catroest FYI

michelu89 commented 1 year ago

Hi @bs-jokri,

after taking a closer look at your issue, I have some suggestions that could help you with editing Aspect Models:

In your case, I noticed that in line 649 of your Aspect Model file, the definition "ext-pcf:otherOperatorName bamm:characteristic bamm-c:Text" is not a valid element because the type is not specified. This element is considered isolated, so it is not picked up by the SAMM CLI, but it is recognized as an error by the Aspect Model Editor since a user may want to continue working with isolated elements.

Can you provide us with more information on how you created this Aspect Model? This will help us identify any potential bugs that may have caused problems in the Aspect Model editor.

To enable you to continue modeling, we suggest deleting this line manually and reloading the Aspect Model.

bs-jokri commented 1 year ago

@catroest is this comment helping you?

catroest commented 1 year ago

Not really. The core problem is that the editor allows property-level relationships and can save them. But when you open it again, you get this error. Linking the elements on the characteristic level works.

I am aware of an (additional) conflict due to different BAMM/SAMM versions, but this is not the core of the problem.

"When loading the Aspects, load those without dependencies first, and then load the respective aspect model with the dependencies." If you mean here I should load the "shared aspect" first in my workspace and then the other, I did so.

I had also noticed the error in line 649 and this has been removed. But this did not lead to the solution of the error.

-- The solution was now solved by connecting other aspects via the level of the characteristic, no longer via the properties. But this is not the solution for this problem only a workaround to have a valid model in the editor.

michelu89 commented 1 year ago

@catroest

Based on my understanding, there seems to be an issue with loading an Aspect Model that is connected that has an external property. Can you please confirm if my understanding is correct? (Refer to the example below)

I would recommend checking this again in version 4.4.0, as I personally tested it and the Aspect mModel loaded correctly along with its external property.

If the error persists, providing a step-by-step list or a short video demonstrating the issue would be greatly helpful for us to reproduce and address it.

:ProductIdentificationEntity a samm:Entity ;
   samm:preferredName "Product Identification Entity "@en ;
   samm:description "Entity encapsulating the product identification."@en ;
   samm:properties ( :tradeName :productCode :reachRegistration [ samm:property :substanceName; samm:optional true ] :casNumber [ samm:property :ecNumber; samm:optional true ] [ samm:property :indexNumber; samm:optional true ] ext-typization:localIdentifiers ) .
catroest commented 1 year ago

Yes exactly. The problem is at this part: ext-typization:localIdentifiers in the properties. I will check again with the newest version and rewirte my comment here.

catroest commented 1 year ago

resolved