admin-shell-io / aas-specs

Repository of the Asset Administration Shell Specification IDTA-01001 - Metamodel
https://industrialdigitaltwin.org/en/content-hub/aasspecifications
Creative Commons Attribution 4.0 International
45 stars 26 forks source link

Clarify Handling of globalAssetId and specificAssetId (Constraint AASd-116) #390

Open BirgitBoss opened 3 months ago

BirgitBoss commented 3 months ago

Is your feature request related to a problem? Please describe. Handling of globalAssetId and specificAssetId is not completely clear in combination with. Background Part 1:

Background Part 1 Metamodel: Both attributes are optional but with the following note:

The asset has a globally unique identifier, plus – if needed – additional domain-specific (proprietary) identifiers. However, to support the corner case of very first phase of life cycle where a stabilized/constant global asset identifier does not already exist, the corresponding attribute "globalAssetId" is optional.

and the following constraints: Constraint AASd-116: "globalAssetId" (case-insensitive) is a reserved key. If used as value for SpecificAssetId/name, SpecificAssetId/value shall be identical to AssetInformation/globalAssetId.

Constraint AASd-131: The globalAssetId or at least one specificAssetId shall be defined for AssetInformation.

Describe the solution you'd like Decision Proposal from TF AAS API from 2024-03-27 and approved by TF Metamodel from 2024-03-27

Describe alternatives you've considered Use Case: Create a new AAS (in bold the one that would be the expected behavior for the recommended solution:

A) Create a new AASDescriptor or AAS:

Violation of AASD-116: stating that the name globalAssetId must not be used for SpecificAssetIds, or

Violation of AASd-131: stating that there must be at least one valid entry for globalAssetId or specificAssetIds if no other other SpecificAssetId is defined



* Case 2: The caller sends the globalAssetId as part of the shell but not as part of the specificAssetId  

  * We could add the globalAssetId to the specifcAssetId 

       *  and also return it as part of specificAssetId in shell 

       * remove it from specificAssetiIds 

  * **Not add it as part of the specificAssetIds**  but support search for it on shell level but not on specificAssetId 

* Case3: The caller sends the globalAssetId as part of the specificAssetId and as part of the shell but they are different  

  * We could throw an error that they are not identical 

  * **Throw an erro**r , reason: 

`Violation of AASD-116: stating that the name globalAssetId must not be used for SpecificAssetIds`

* Case4: The caller does not send any info for the globalAssetId    

  * We could throw a warning that there is no global asset ID defined 

  *  **Throw an error**, reason: 

`Violation of AASd-131: stating that there must be at least one valid entry for globalAssetId or specificAssetIds if no other other SpecificAssetId is defined `
g1zzm0 commented 2 months ago

Remove attribute globalAssetID and force a (Key,Val) tuple in specific Asset ID that has the keyword "globalAssetID".

BirgitBoss commented 2 months ago

2024-04-12 Workstream AAS: approved

BirgitBoss commented 2 months ago

In combination with https://github.com/admin-shell-io/aas-specs/issues/298 the proposal is to state the following:

Constraint AASd-116: : "globalAssetId" (case-insensitive) is a reserved key for SpecificAssetId/name with the semantics as defined in https://admin-shell.io/aas/3/0/AssetInformation/globalAssetId.

Note: AASd-116 is important to enable a generic search across global and specific asset IDs (e.g. in IDTA-01002-3-0 discovery operations like GetAllAssetLinksById). In the future the constraint might become more strict in stating that the name “globalAssetId” shall not be used as SpecificAssetId/name.

mristin commented 2 months ago

[...] "globalAssetId" (case-insensitive) [...]

Please note that the case-sensitivity can not be reliably implemented across different cultures (good example is Turkish because of the i, I, İ and ı). You can specify a regular expression, specifying exactly which characters are meant, though.

BirgitBoss commented 2 weeks ago

Workstream AAS Specs Change to

Constraint AASd-116: : "globalAssetId" (case-insensitive) is a reserved key for SpecificAssetId/name with the semantics as defined in https://admin-shell.io/aas/3/0/AssetInformation/globalAssetId.

Note: AASd-116 is important to enable a generic search across global and specific asset IDs (e.g. in IDTA-01002-3-0 discovery operations like GetAllAssetLinksById). In the future the constraint might become more strict in stating that the name “globalAssetId” shall not be used as SpecificAssetId/name.