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

ValueType is not correctly stored when using the PUT-SubmodelElement-Example #84

Closed
lenaxus opened this issue Nov 22, 2021 · 2 comments
Closed

Comments

@lenaxus
Copy link

lenaxus commented Nov 22, 2021

I want to add a SubmodelElement to my AAS. I first tried your example to add the new Property RotationSpeedNEW:

PUT http://localhost:51310/aas/ExampleMotor/submodels/OperationalData/elements
Payload:

{
    "value": "1234",
    "valueId": null,
    "semanticId": {
      "keys": [
        {
          "type": "ConceptDescription",
          "local": true,
          "value": "http://customer.com/cd//1/1/18EBD56F6B43D895",
          "index": 0,
          "idType": "IRI"
        }
      ]
    },
    "constraints": [],
    "hasDataSpecification": [],
    "idShort": "RotationSpeedNEW",
    "category": "VARIABLE",
    "modelType": {
      "name": "Property"
    },
    "valueType": {
      "dataObjectType": {
        "name": "integer"
      }
    }
}

This all worked fine and the Property was added to the AAS. But when looking in detail in the new entry it looks like the valueType is not correctly stored in the AAS because it is empty. This is my result of the

GET http://localhost:51310/aas/ExampleMotor/submodels/OperationalData/elements/RotationSpeedNEW

Result:

{
  "elem": {
    "value": "1234",
    "valueId": null,
    "semanticId": {
      "keys": [
        {
          "type": "ConceptDescription",
          "local": true,
          "value": "http://customer.com/cd//1/1/18EBD56F6B43D895",
          "index": 0,
          "idType": "IRI"
        }
      ]
    },
    "constraints": [],
    "hasDataSpecification": [],
    "idShort": "RotationSpeedNEW",
    "category": "VARIABLE",
    "modelType": {
      "name": "Property"
    },
    "valueType": {
      "dataObjectType": {
        "name": ""
      }
    },
    "kind": "Instance",
    "descriptions": null
  },

There you can see that valueType.dataObjectType.name is empty but in the payload of the PUT-Request it was defined as integer.

Can anyone please help me why this is happening?

@br-iosb
Copy link
Contributor

br-iosb commented Mar 7, 2022

It seems that dataObjectType is unspecified and that key should not serialize as in your example. JSON de/serialization seems out of sync with spec and should be fixed.

@juileetikekar
Copy link
Contributor

Hi @lenaxus,

The issue has been fixed in latest version of the server which supports AAS Meta-model V3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants