Question

When I send this request (updateContext/APPEND)

 { "updateAction":"APPEND",
   "contextElements":[
      { "id":"AssetPerformanceCEP759",
        "isPattern":"false",
        "attributes":[
             { "name":"TimeInstant",
               "type":"urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
               "value":"2014-04-29T13:18:05Z" },
             { "value":"12,10",
               "name":"location",
               "type":"Location",
               "metadatas":[
                    { "name":"location",
                      "type":"string",
                      "value":"WSG84" },
                    { "name":"phenomenon",
                      "type":"string",
                      "value":"urn:x-ogc:def:phenomenon:IDAS:1.0:location" },
                    { "name":"TimeInstant",
                      "type":"urn:x-ogc:def:trs:IDAS:1.0:ISO8601",
                      "value":"2014-04-29T13:18:05Z"}
                     ]}
      ],
   "type":"ModelPerformanceCEP"}
 ]}

twice, I get following response:

"statusCode" : {
    "code" : "472",
    "reasonPhrase" : "request parameter is invalid/not allowed",
    "details" : "action: APPEND - entity: (AssetPerformanceCEP759, ModelPerformanceCEP) - offending attribute: location - attemp to define a location attribute (location) when another one has been previously defined (location)"
  }

attribute is one ("name": "location"). If attribute is updated (location attribute is not another definition) Orion could update it (as orion does with others)

Was it helpful?

Solution

Orion 0.12.0 or before doesn't allow including the location metadata for an attribute in which location has been alredy defined.

Version 0.13.0 will solve this, cheking that there has been an actual attemp of redefining the location attribute and raising error only in that case.

An issue has been created at github.com for dealing with this: https://github.com/telefonicaid/fiware-orion/issues/351

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top