[Fiware-ngsi] NGSI10 updateContext response interpretation

Fermín Galán Márquez fermin at tid.es
Thu Feb 28 09:54:46 CET 2013


Hi,

The updateContext operation (OMA specification 5.4.6) includes a ContextElementResponse list in the response. We think that a list of ContextElementResponses makes full sense in the case of queryContext, but it is a bit strange in the case of an update operation except if the purpose is to acknowledged in some way that the update operations in the individual entities have been successfully completed or not. In this sense, our proposal is as follows:

  *   For each no pattern entity (i.e. isPattern=false) in the ContextElement list in the request, a ContextElementResponse is included in the response, that shall include:
     *   A ContextElement that includes the entity (isPattern=false) and attributes in the corresponding ContextElement in the request, but not the attribute values (it doesn't make sense to return the values, as the client sending the updateContext request already know them).
     *   An StatusCode with the result (success or failure) of the processing of the ContextElement update
  *   For each pattern entity (i.e. isPattern=true) in the ContextElement list in the request, N ContextElementResponses are included in the response (as many as matching entities), each one shall include:
     *   A ContextElement that includes the entity (isPattern=false) and attributes in the corresponding ContextElement in the request, but not the attribute values (it doesn't make sense to return the values, as the client sending the updateContext request already know them).
     *   An StatusCode with the result (success or failure) of the processing of the ContextElement update

For example, considering that the NGSI server has the following data:

  *   Entity R1 with attributes A=1, B=2, C=3
  *   Entity E1 with attributes A=5, B=10, C=22
  *   Entity E2 with attributes A=7, C=100

(I'm omitting types in entities and attributes as they aren't relevant for the example).

Let's consider the following updateContext request with 2 ContextElements and updateAction = UPDATE:

  *   CE1:
     *   Entity: R1 (isPattern=false)
     *   Attribute: A=30
  *   CE2:
     *   Entity: E.* (isPattern=true)
     *   Atttribute: B=40

The response will include 3 ContextElementResponses, in the following way:

  *   CER1:
     *   CE
        *   Entity R1 (isPattern=false)
        *   Attribute: A
     *   StatusCode="Ok"
  *   CER2:
     *   CE
        *   Entity E1 (isPattren=false)
        *   Attribute: B
     *   StatusCode="Ok"
  *   CER3:
     *   CE:
        *   Entity E2 (isPattren=false)
        *   Attribute: B
     *   StatusCode="Not found"

What do you think?

Best regards,

------
Fermín

________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-ngsi/attachments/20130228/a667934a/attachment.html>


More information about the Fiware-ngsi mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy