eclipse-aaspe / package-explorer

AASX Package Explorer
Other
44 stars 12 forks source link

[BUG] Submodel Reference not correct #28

Closed BirgitBoss closed 4 months ago

BirgitBoss commented 5 months ago

To Reproduce Steps to reproduce the behavior:

  1. download https://github.com/admin-shell-io/submodel-templates/blob/main/published/Carbon%20Footprint/0/9/IDTA%202023-0-9%20_Template_CarbonFootprint.aasx
  2. import to explorer
  3. create new AAS and add a reference to the existing Submodel CarbonFootprint
  4. save as "xml"

The new reference looks like this:

      <submodels>
        <reference>
          <type>ExternalReference</type>
          <keys>
            <key>
              <type>Submodel</type>
              <value>https://admin-shell.io/idta/CarbonFootprint/CarbonFootprint/0/9</value>
            </key>
          </keys>
        </reference>
      </submodels>

but should look like this (ModelReference instead of ExternalReference):

      <submodels>
        <reference>
          <type>ModelReference</type>
          <keys>
            <key>
              <type>Submodel</type>
              <value>https://admin-shell.io/idta/CarbonFootprint/CarbonFootprint/0/9</value>
            </key>
          </keys>
        </reference>
      </submodels>

Version used: v2024-01-15, Build date: Mon 01/15/2024

JS-Aibel commented 5 months ago

I do not know if it is relevant or related to your issue, but this also happens when adding a reference to an existing Concept Description. The semantic id reference on the property becomes an “ExternalReference”. https://github.com/eclipse-aaspe/aaspe/issues/11#issuecomment-1914325742

BirgitBoss commented 5 months ago

I am not sure: here it is the combination of ExternalReference and Submodel that is not ok. The Metamodel requires a model reference. For concept descriptions it is recommended to use external references (I.e. the key in this case is GlobalReference).

juileetikekar commented 4 months ago

Hi @BirgitBoss,

Thank you for raising the issue!! The fix will be provided as soon as possible.