Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CLI SAMM2AASX errors when generating AAS Submodel Template #432

Closed
BirgitBoss opened this issue Oct 10, 2023 · 3 comments · Fixed by #459
Closed

[BUG] CLI SAMM2AASX errors when generating AAS Submodel Template #432

BirgitBoss opened this issue Oct 10, 2023 · 3 comments · Fixed by #459
Assignees
Labels
2023-10-19 aas acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working

Comments

@BirgitBoss
Copy link
Contributor

BirgitBoss commented Oct 10, 2023

Describe the bug
I had a look at https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.batch/2.0.0/gen and wanted to edit it with the aasx package explorer. This is not yet supported.
Note: I do not know which version of the CLI generator is used in Catena-X at this point in time.

I had a look at the generated xml file and found the following issues. For importing into aasx package explorer fixing 2) and 6) is the most important, then 4). Then it can be imported.

  1. Remove "Optional and brackets from value" (see also 2)
              <aas:key>
                <aas:type>GlobalReference</aas:type>
                <aas:value>Optional[urn:samm:io.catenax.batch:2.0.0#Batch]</aas:value>
              </aas:key>

or
<aas:id>Optional[urn:samm:io.catenax.batch:2.0.0#Batch]/submodel</aas:id>
etc.

  1. Remove embeddedDataSpecification for AAS. There no data specifications defined for AAS. A SAMM model is not a data specification.

Note: This is sufficient to load it to the aasx package explorer in the first place!

  1. recommendation to not add optional elements if they are not included like
    </aas:displayName>
    </aas:value>

  2. The data specification for concept descriptions has the value (see Part 3a V3.0)
    https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3/0
    i.e. instead of

<aas:embeddedDataSpecification>
          <aas:dataSpecification>
            <aas:type>ExternalReference</aas:type>
            <aas:keys>
              <aas:key>
                <aas:type>GlobalReference</aas:type>
                <aas:value>Optional[urn:samm:io.catenax.batch:2.0.0#Batch]</aas:value>
              </aas:key>
            </aas:keys>
          </aas:dataSpecification>
          <aas:dataSpecificationContent>
            <aas:dataSpecificationIec61360>

we have

<aas:embeddedDataSpecification>
          <aas:dataSpecification>
            <aas:type>ExternalReference</aas:type>
            <aas:keys>
              <aas:key>
                <aas:type>GlobalReference</aas:type>
                <aas:value>https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIec61360/3/0</aas:value>
              </aas:key>
            </aas:keys>
          </aas:dataSpecification>
          <aas:dataSpecificationContent>
            <aas:dataSpecificationIec61360>
  1. use "en" for language code consistently, i.e. change
              <aas:shortName>
                <aas:langStringShortNameTypeIec61360>
                  <aas:language>EN</aas:language>
                  <aas:text>Batch</aas:text>
                </aas:langStringShortNameTypeIec61360>
  1. please add a submodel reference to the AAS for the SMT. Otherwiese submodel will not correctly be loaded to aasx package explorer
	  			<aas:submodels>
				<aas:reference>
					<aas:type>ModelReference</aas:type>
					<aas:keys>
						<aas:key>
							<aas:type>Submodel</aas:type>
							<aas:value>urn:samm:io.catenax.batch:2.0.0#Batch</aas:value>
						</aas:key>
					</aas:keys>
				</aas:reference>
			</aas:submodels>
  1. It seems "https://admin-shell.io/aas/3/0 AAS.xsd" a \ is missing before AAS.xsd?

<aas:environment xmlns:aas="https://admin-shell.io/aas/3/0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://admin-shell.io/aas/3/0 AAS.xsd">

  1. There is a prefix "id_" for each idShort. Remove prefix "id_" from generated idShort names

  2. There is a value "Unknown" for many Properties.

image
This is not a valid xs:dateTime value. In these cases please just do not add any value. Instead the example value "2022-02-04T14:48:54" should be added usw. or no value at all

Where
CLI

Edit @atextor: XML formatting

@BirgitBoss BirgitBoss added the bug Something isn't working label Oct 10, 2023
@BirgitBoss
Copy link
Contributor Author

See also #434

@BirgitBoss BirgitBoss changed the title [BUG] CLI errors when generating AAS Submodel Template [BUG] CLI SAMM2AASX errors when generating AAS Submodel Template Oct 18, 2023
@BirgitBoss
Copy link
Contributor Author

When importing the file into the aasx package explorer note this behavior: https://github.com/admin-shell-io/temp-aasx-package-explorer/issues/118

@chris-volk chris-volk added acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. 2023-10-19 labels Oct 19, 2023
atextor added a commit that referenced this issue Nov 9, 2023
…ering_import_to_aas_package_explorer

Fix #432 several aas issues hindering import to aas package explorer
@BirgitBoss
Copy link
Contributor Author

I checked the aasx (in this issue I just imported the xml but not the aasx file as such). I created a new issue for the file format itself:
#488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2023-10-19 aas acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants