Constraint AASd-127 incorrectly rejected valid DEXPI RelationshipElement structure
Description
The AAS validator rejects valid DEXPI-compliant JSON structures with the error:
Constraint AASd-127 violated: key 3 must be preceded by File or Blob @ /submodels/0/submodel_elements/1/value/2/value/17/value/3/first
However, the official DEXPI template (IDTA-02012-1-0_Template_DEXPI.json) uses exactly this structure with SubmodelElement before FragmentReference.
Root Cause
The constraint AASd-127 (from the general AAS metamodel) states that a FragmentReference must be preceded by a File or Blob key. However, in the DEXPI specification context, a SubmodelElement with value="ModelFile" is used as an exception to navigate to the ModelFile element before applying the fragment reference.
Expected Behavior
The validator should accept the following valid DEXPI RelationshipElement key structure (as shown in the official template):
{
"idShort": "RelationshipElement_example",
"modelType": "RelationshipElement",
"first": {
"type": "ModelReference",
"keys": [
{ "type": "Submodel", "value": "urn:uuid:9f236679-e52d-4a52-aa85-dea871a89f9b" },
{ "type": "SubmodelElementCollection", "value": "Model01" },
{ "type": "SubmodelElement", "value": "ModelFile" },
{ "type": "FragmentReference", "value": "ProteusXML@ID=ProcessInstrumentationFunction-3" }
]
},
"second": {
"type": "ExternalReference",
"keys": [
{ "type": "GlobalReference", "value": "https://example.org/role/ProcessInstrumentationFunction-3" }
]
}
}
Actual Behavior
The validator rejects the above JSON with Constraint AASd-127 violated: key 3 must be preceded by File or Blob.
Reproduction Steps
- Generate or load a DEXPI-compliant AAS JSON with RelationshipElements in TagMapping/SubTagMapping (as per IDTA-02012-1-0)
- Validate the JSON
- Observe the constraint violation, even though the structure matches the official DEXPI template
Evidence
- DEXPI Specification: IDTA-02012-1-0 (Tables 6 & 7, pages 20-21)
- Official DEXPI Template: IDTA-02012-1-0_Template_DEXPI.json (included in IDTA-02012-1-0 i.e. the github repo of idta aas)
- Example from template (line excerpt):
"keys": [
{ "type": "Submodel", "value": "https://epc.org/smid/9f236679-e52d-4a52-aa85-dea871a89f9b" },
{ "type": "SubmodelElementCollection", "value": "Model01" },
{ "type": "SubmodelElement", "value": "ModelFile" },
{ "type": "FragmentReference", "value": "ProteusXML@ID=ProcessInstrumentationFunction-3" }
]
Suggested Fix
The AASd-127 constraint should be refined to allow SubmodelElement (with value="ModelFile") as a valid predecessor to FragmentReference in the context of DEXPI RelationshipElements, or a DEXPI-specific constraint exception should be added.
Environment
- Validator Version: 1.0.3
- DEXPI Specification Version: IDTA-02012-1-0 (2023-09-01)
Constraint AASd-127 incorrectly rejected valid DEXPI RelationshipElement structure
Description
The AAS validator rejects valid DEXPI-compliant JSON structures with the error:
However, the official DEXPI template (IDTA-02012-1-0_Template_DEXPI.json) uses exactly this structure with
SubmodelElementbeforeFragmentReference.Root Cause
The constraint AASd-127 (from the general AAS metamodel) states that a
FragmentReferencemust be preceded by aFileorBlobkey. However, in the DEXPI specification context, aSubmodelElementwithvalue="ModelFile"is used as an exception to navigate to the ModelFile element before applying the fragment reference.Expected Behavior
The validator should accept the following valid DEXPI RelationshipElement key structure (as shown in the official template):
Actual Behavior
The validator rejects the above JSON with
Constraint AASd-127 violated: key 3 must be preceded by File or Blob.Reproduction Steps
Evidence
Suggested Fix
The AASd-127 constraint should be refined to allow
SubmodelElement(with value="ModelFile") as a valid predecessor toFragmentReferencein the context of DEXPI RelationshipElements, or a DEXPI-specific constraint exception should be added.Environment