Closed lenaxus closed 1 year ago
Would it be possible to provide an example AAS (e.g., as AASX) so that we can take a look at it?
Yes for sure, here is my example AAS as json:
{
"conceptDictionary": [],
"conceptDictionaries": [],
"hasDataSpecification": [],
"dataSpecification": [],
"modelType": {
"name": "AssetAdministrationShell"
},
"identification": {
"idType": "IRI",
"id": "github_test"
},
"idShort": "aas_test",
"asset": {
"identification": {
"idType": "IRI",
"id": "asset_test"
},
"idShort": "test",
"keys": [],
"kind": "Instance",
"index": 0
},
"embeddedDataSpecifications": [],
"views": [],
"submodels": [
{
"keys": [
{
"idType": "IRI",
"type": "Submodel",
"value": "http://test.com/aas/0815/submodel/Nameplate",
"local": true
}
]
}
]
}
And here the Nameplate submodel:
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "Submodel",
"value": "https://admin-shell.io/zvei/nameplate/1/0/Nameplate",
"local": false
}
]
},
"identification": {
"idType": "IRI",
"id": "http://test.com/aas/0815/submodel/Nameplate"
},
"idShort": "Nameplate",
"kind": "Instance",
"hasDataSpecification": [],
"administration": {
"version": "1",
"revision": "0"
},
"dataSpecification": [],
"qualifiers": [],
"modelType": {
"name": "Submodel"
},
"embeddedDataSpecifications": [],
"submodelElements": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO677#002",
"local": false
}
]
},
"idShort": "ManufacturerName",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Hersteller"
},
{
"language": "en",
"text": "Company name"
}
]
},
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAM556#002",
"local": false
}
]
},
"idShort": "SerialNumber",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "serialNumber",
"constraints": []
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAQ832#005",
"local": false
}
]
},
"idShort": "Address",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO127#003",
"local": false
}
]
},
"idShort": "Department",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Vertrieb"
},
{
"language": "en",
"text": "Sales"
}
]
},
"constraints": []
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAQ833#005",
"local": false
}
]
},
"idShort": "Phone01",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"category": "PARAMETER",
"allowDuplicates": false,
"constraints": [],
"value": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO137#003",
"local": false
}
]
},
"idShort": "TypeOfTelephone",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "office",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO136#002",
"local": false
}
]
},
"idShort": "TelephoneNumber",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "tel"
}
]
},
"constraints": []
}
]
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO134#002",
"local": false
}
]
},
"idShort": "NationalCode",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "DE"
}
]
},
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAQ326#002",
"local": false
}
]
},
"idShort": "AddressOfAdditionalLink",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "link",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO129#002",
"local": false
}
]
},
"idShort": "Zipcode",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Zipcode"
}
]
},
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO128#002",
"local": false
}
]
},
"idShort": "Street",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Straße"
}
]
},
"constraints": []
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAQ836#005",
"local": false
}
]
},
"idShort": "Email01",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO198#002",
"local": false
}
]
},
"idShort": "EmailAddress",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "email",
"constraints": []
}
]
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO133#002",
"local": false
}
]
},
"idShort": "StateCounty",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Bundesland"
}
]
},
"constraints": [],
"descriptions": [
{
"language": "en",
"text": "federal state a part of a state"
}
]
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO132#002",
"local": false
}
]
},
"idShort": "CityTown",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Stadt"
}
]
},
"constraints": []
}
]
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAW338#001",
"local": false
}
]
},
"idShort": "ManufacturerProductDesignation",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Beispiel Beschreibung"
},
{
"language": "en",
"text": "Example Designation"
}
]
},
"constraints": []
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/zvei/nameplate/1/0/",
"local": false
}
]
},
"idShort": "AssetSpecificProperties",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"idShort": "ScrewSpeed",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "12000 U/min",
"constraints": []
},
{
"idShort": "MainDrive",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "10000 kW",
"constraints": []
}
]
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAP906#001",
"local": false
}
]
},
"idShort": "YearOfConstruction",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "2022",
"constraints": []
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/zvei/nameplate/1/0/",
"local": false
}
]
},
"idShort": "Markings",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/zvei/nameplate/0/1/Nameplate/Markings/Marking",
"local": false
}
]
},
"idShort": "Marking01",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/zvei/nameplate/1/0/Nameplate/Markings/Marking/MarkingFile",
"local": false
}
]
},
"idShort": "MarkingFile",
"hasDataSpecification": [],
"kind": "Instance",
"mimeType": "image/png",
"modelType": {
"name": "File"
},
"category": "PARAMETER",
"value": "",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/zvei/nameplate/1/0/",
"local": false
}
]
},
"idShort": "MarkingName",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "string"
}
},
"modelType": {
"name": "Property"
},
"category": "PARAMETER",
"value": "CE",
"constraints": []
}
]
}
]
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "173-1#02-AAU731#001",
"local": false
}
]
},
"idShort": "ManufacturerProductFamily",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": {
"langString": [
{
"language": "de",
"text": "Beispiel Familie"
},
{
"language": "en",
"text": "Example Family"
}
]
},
"constraints": []
}
]
}
And I want to retrieve the nameplate-submodel in a minimized version with /values. Here is my request:
http://localhost:8081/aasServer/shells/github_test/aas/submodels/Nameplate/submodel/values
But the response is:
{
"success": false,
"messages": []
}
The submodel JSON is not consistent with the schema defined in Details of the AAS Part 1 V2.0.1. On p. 250, the following is specified:
"MultiLanguageProperty":{
"allOf":[
{
"$ref":"#/definitions/SubmodelElement"
},
{
"properties":{
"value":{
"type":"array",
"items":{
"$ref":"#/definitions/LangString"
}
},
"valueId":{
"$ref":"#/definitions/Reference"
}
}
}
]
}
If you remove the "langstring" entry in the MultiLanguageProperties value, everything is working correctly.
Did you create this JSON with the AASX Package Explorer or by hand/in a proprietary way?
No, I did create it by hand. Can you maybe give me an example for a right configured MultiLanguageProperty? It still is not working when deleting the "langstring" key.
The following stripped down submodel illustrates how to adapt the MLP:
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "Submodel",
"value": "https://admin-shell.io/zvei/nameplate/1/0/Nameplate",
"local": false
}
]
},
"identification": {
"idType": "IRI",
"id": "http://test.com/aas/0815/submodel/Nameplate"
},
"idShort": "Nameplate",
"kind": "Instance",
"hasDataSpecification": [],
"administration": {
"version": "1",
"revision": "0"
},
"dataSpecification": [],
"qualifiers": [],
"modelType": {
"name": "Submodel"
},
"embeddedDataSpecifications": [],
"submodelElements": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "GlobalReference",
"value": "0173-1#02-AAO677#002",
"local": false
}
]
},
"idShort": "ManufacturerName",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "PARAMETER",
"value": [
{
"language": "de",
"text": "Hersteller"
},
{
"language": "en",
"text": "Company name"
}
],
"constraints": []
}
]
}
Thank you, now it is working.
Can you maybe say if this /values endpoint is also available for a first draft of the BillOfMaterial-submodel?
Yes, it should work
Okay, this sounds very interessting for me because retrieving a minimzed version of the BillOfMaterial-Submodel is exactly our use-case. With this instance it is unfortunaley not working:
`
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "Submodel",
"value": "https://admin-shell.io/idta/bom/1/0",
"local": false
}
]
},
"identification": {
"idType": "IRI",
"id": "http://test.com/aas/0815/submodel/BillOfMaterial"
},
"idShort": "BillOfMaterial",
"kind": "Instance",
"hasDataSpecification": [],
"administration": {
"version": "1",
"revision": "0"
},
"dataSpecification": [],
"qualifiers": [],
"modelType": {
"name": "Submodel"
},
"embeddedDataSpecifications": [],
"submodelElements": [
{
"semanticId": {
"keys": []
},
"idShort": "Machine",
"entityType": "SelfManagedEntity",
"hasDataSpecification": [],
"kind": "Instance",
"statements": [
{
"semanticId": {
"keys": []
},
"idShort": "Motor",
"entityType": "CoManagedEntity",
"hasDataSpecification": [],
"kind": "Instance",
"statements": [
],
"modelType": {
"name": "Entity"
},
"asset": {
"keys": []
},
"constraints": []
}
],
"modelType": {
"name": "Entity"
},
"asset": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "Asset",
"value": "asset_test2",
"local": false
}
]
},
"category": "",
"constraints": []
}
]
}
Maybe do you have here also an clue why the /values is not working?
Thanks for pointing this out, there's a bug regarding statements right now in BaSyx. For now, you can circumvent triggering this by using "statement" instead of "statements". However, due to this, the "/values" serialization of a Statement is not handled correctly.
I will create separate issues for this and update them accordingly.
Can be closed upon resolving eclipse-basyx/basyx-java-sdk#158 and eclipse-basyx/basyx-java-sdk#159
Both issues are resolved. The fixes are already available on the development branch and will be integrated in the next release
I tried the /values-Endpoint with another submodel which is the SoftwareNameplate-Submodel. Unfortunately it is not working and I am getting a 500 error.
Here is my submodel:
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "Submodel",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware",
"local": false
}
]
},
"identification": {
"idType": "IRI",
"id": "https://company.com/aas/Tool/2_6_0/submodel/SoftwareNameplate"
},
"idShort": "SoftwareNameplate",
"kind": "Instance",
"hasDataSpecification": [],
"administration": {
"version": "1",
"revision": "0"
},
"dataSpecification": [],
"qualifiers": [],
"modelType": {
"name": "Submodel"
},
"embeddedDataSpecifications": [],
"submodelElements": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAO677#002",
"local": true
}
]
},
"idShort": "ManufacturerName",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "Company",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAU734#001",
"local": true
}
]
},
"idShort": "ManufacturerProductDescription",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "PC software for the parametrisation",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/InstallerType",
"local": true
}
]
},
"idShort": "InstallerType",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "ZIP-File",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/ReleaseDate",
"local": true
}
]
},
"idShort": "ReleaseDate",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "16.02.21",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAO694#001",
"local": true
}
]
},
"idShort": "URL",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "https://www.company.com",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/ReleaseNotes",
"local": true
}
]
},
"idShort": "ReleaseNotes",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "CONSTANT",
"value": [
{
"language": "en",
"text": "Now Supporting Improvements, Bugfixes"
}
],
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/InstallationURI",
"local": true
}
]
},
"idShort": "InstallationURI",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "https://company.com/Tool.zip",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAU731#001",
"local": true
}
]
},
"idShort": "ManufacturerProductFamily",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "Windows-Application",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://www.hsu-hh.de/aut/aas/companylogo",
"local": true
}
]
},
"idShort": "CompanyLogo",
"hasDataSpecification": [],
"kind": "Instance",
"mimeType": "",
"modelType": {
"name": "File"
},
"category": "CONSTANT",
"value": "https://www.company.com/logo-d-2x.jpg",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAU732#001",
"local": true
}
]
},
"idShort": "VersionInfo",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "CONSTANT",
"value": [],
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/Version",
"local": true
}
]
},
"idShort": "Version",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "2.6.0",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/BuildDate",
"local": true
}
]
},
"idShort": "BuildDate",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "16.02.21",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/InstallationChecksum",
"local": true
}
]
},
"idShort": "InstallationChecksum",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAW338#001",
"local": true
}
]
},
"idShort": "ManufacturerProductDesignation",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "Tool",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://admin-shell.io/zvei/nameplate/1/0/NameplateSoftware/VersionName",
"local": true
}
]
},
"idShort": "VersionName",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "ConceptDescription",
"value": "https://www.hsu-hh.de/aut/aas/assetid",
"local": true
}
]
},
"idShort": "AssetId",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"dataObjectType": {
"name": "String"
}
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "https://company.com/Tool/2_6_0",
"constraints": []
}
]
}
Can you maybe say me what is the problem with the submodel?
The issue with this submodel is the wrong serialization of the valueType. It should be for example "valueType": "string".
The image is taken from DotAAS Part 1 v2.0.1 p. 242
Thank you! Now /values is working.
I have another question for the "valueType" property in a SubmodelElement. I want to store a date in the valueType. I have read the standard:
And then I described my SubmodelElement like that:
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/ValidDate/1/1",
"local": false
}
]
},
"idShort": "ValidDate",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": {
"type": "string",
"enum": ["date"]
},
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "2022-12-12",
"constraints": []
}
But if I define it as above, the /values endpoint is not working anymore. Do you maybe have a hint also for that problem?
Thank you in advance! :)
I think you're mixing up the JSON schema and the actual json instance. The correct modeling of the valueType is as follows:
...
"valueType": "date",
...
Thank you. Unfortunately with this declaration the /values-endpoint is not working anymore. Our value is in the format "2021-01-01", is this a known issue?
Would it be possible to provide a complete Submodel example? Then, I will take a look at the issue and come back to you.
Yes for sure, for example for the TechnicalData-submodel:
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "http://admin-shell.io/ZVEI/TechnicalData/Submodel/1/2",
"local": false
}
]
},
"identification": {
"idType": "IRI",
"id": "https://company.com/aas/Product/submodel/TechnicalData"
},
"idShort": "TechnicalData",
"kind": "Instance",
"hasDataSpecification": [],
"administration": {
"version": "1",
"revision": "2"
},
"dataSpecification": [],
"qualifiers": [],
"modelType": {
"name": "Submodel"
},
"embeddedDataSpecifications": [],
"submodelElements": [
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/FurtherInformation/1/1",
"local": false
}
]
},
"idShort": "FurtherInformation",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/ValidDate/1/1",
"local": false
}
]
},
"idShort": "ValidDate",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": "date",
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "2021-01-01",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/TextStatement/1/1",
"local": false
}
]
},
"idShort": "TextStatement01",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "CONSTANT",
"value": [
{
"language": "en",
"text": "software program"
}
],
"constraints": []
}
]
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/GeneralInformation/1/1",
"local": false
}
]
},
"idShort": "GeneralInformation",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": [
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAO677#002",
"local": true
}
]
},
"idShort": "ManufacturerName",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": "string",
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "Company",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/ProductImage/1/1",
"local": false
}
]
},
"idShort": "ProductImage",
"hasDataSpecification": [],
"kind": "Instance",
"mimeType": "image/jpg",
"modelType": {
"name": "File"
},
"value": "url",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAW338#001",
"local": true
}
]
},
"idShort": "ManufacturerProductDesignation",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "MultiLanguageProperty"
},
"category": "CONSTANT",
"value": [
{
"language": "en",
"text": "Product"
}
],
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAO227#002",
"local": true
}
]
},
"idShort": "ManufacturerOrderCode",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": "string",
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "",
"constraints": []
},
{
"semanticId": {
"keys": [
{
"idType": "IRDI",
"index": 0,
"type": "ConceptDescription",
"value": "0173-1#02-AAO676#003",
"local": true
}
]
},
"idShort": "ManufacturerArticleNumber",
"hasDataSpecification": [],
"kind": "Instance",
"valueType": "string",
"modelType": {
"name": "Property"
},
"category": "CONSTANT",
"value": "",
"constraints": []
}
]
},
{
"ordered": false,
"semanticId": {
"keys": [
{
"idType": "IRI",
"index": 0,
"type": "GlobalReference",
"value": "https://admin-shell.io/ZVEI/TechnicalData/TechnicalProperties/1/1",
"local": false
}
]
},
"idShort": "TechnicalProperties",
"hasDataSpecification": [],
"kind": "Instance",
"modelType": {
"name": "SubmodelElementCollection"
},
"allowDuplicates": false,
"constraints": [],
"value": []
}
]
}
The FurtherInformation.ValidDate property is right now modeled with ... "valueType": "date", ...
and then the /values endpoint is not working anymore. If I change it back to "string", the /values endpoint is working.
Thanks a lot! I could reproduce the issue. There's a bug with date in BaSyx, you can avoid it by using dateTime instead.
I've added an issue in the SDK repository: https://github.com/eclipse-basyx/basyx-java-sdk/issues/190
Perfect, thank you for the information :)
In release 1.2.0 the release notes said, that the bug "Fixes submodel element values serialization when getting "/values"" is solved. But after testing the new release the /values is still not working or only for some very certain submodels.
I am using this command: /shells/{aasId}/aas/submodels/{submodelIdShort}/submodel/values. In my case it only works with the TechnicalData-submodel. But that was already the case at the release 1.0.0. So it looks like that there is no improvement for this topic.