Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-6163

FIWARE.Question.Tech.Data.OrionContextBroker.Fiware orion subscription with georel expression in condition

    Details

      Description

      Created question in FIWARE Q/A platform on 17-03-2016 at 16:03
      Please, ANSWER this question AT http://stackoverflow.com/questions/36064565/fiware-orion-subscription-with-georel-expression-in-condition

      Question:
      Fiware orion subscription with georel expression in condition

      Description:
      I have an entity in my orion DB:

      {
      "id"=>"User-121",
      "type"=>"User",
      "location"=>

      { "type"=>"geo:point", "value"=>"59.851484, 30.199463" }

      ,
      "time"=>{"type"=>"none", "value"=>222909, "metadata"=>{}}
      }

      Also, I have 3 subscriptions to this entity, which have the same coordinates in condition's expression:

      Should trigger when the entity is located, at least 100 meters far away from the reference point.

      {
      "id"=>"...",
      "expires"=>"...",
      "status"=>"active",
      "subject"=>{
      "entities"=>[

      {"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
      "condition"=>{
      "attributes"=>["location", "time"],
      "expression"=>{ "q"=>"", "geometry"=>"point", "coords"=>"59.851484, 30.199463", "georel"=>"near;minDistance:100"}
      }
      },
      "notification"=>{ "callback"=>"http://callback", "attributes"=>["time"] }
      }




      Should trigger when the entity is located, at a maximum, 100 meters far away from the reference point



      {
      "id"=>"...",
      "expires"=>"...",
      "status"=>"active",
      "subject"=>{
      "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}

      ],
      "condition"=>{
      "attributes"=>["location", "time"],
      "expression"=>

      { "q"=>"", "geometry"=>"point", "coords"=>"59.851484, 30.199463", "georel"=>"near;maxDistance:100"}

      }
      },
      "notification"=>

      { "callback"=>"http://callback", "attributes"=>["time"] }

      },

      Should trigger when the entity is located at the reference point (has the same coordinates)

      {
      "id"=>"...",
      "expires"=>"...",
      "status"=>"active",
      "subject"=>{
      "entities"=>[

      {"id"=>"User-121", "idPattern"=>"", "type"=>"User"}

      ],
      "condition"=>{
      "attributes"=>["location", "time"],
      "expression"=>

      { "q"=>"", "geometry"=>"point", "coords"=>"59.851484, 30.199463", "georel"=>"equals"}

      }
      },
      "notification"=>

      { "callback"=>"http://callback", "attributes"=>["time"] }

      }

      The problem is that all of the subscriptions send notifications each time I update the entity. It doesn't even depend on the entity's coordinates values. Whatever the coordinates are, I always receive 3 notifications of any update.

      What am I doing wrong ?

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2d 21h 25m 1 Fermín Galán 20/Mar/16 3:27 PM
        In Progress In Progress Answered Answered
        2s 1 Fermín Galán 20/Mar/16 3:27 PM
        Answered Answered Closed Closed
        1s 1 Fermín Galán 20/Mar/16 3:27 PM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        backlogmanager Backlog Manager made changes -
        Summary FIWARE.Question.Tech.Fiware orion subscription with georel expression in condition FIWARE.Question.Tech.Data.OrionContextBroker.Fiware orion subscription with georel expression in condition
        HD-Chapter Data [ 10838 ]
        mev Manuel Escriche made changes -
        Description
        Created question in FIWARE Q/A platform on 17-03-2016 at 16:03
        {color: red}Please, ANSWER this question AT{color} http://stackoverflow.com/questions/36064565/fiware-orion-subscription-with-georel-expression-in-condition


        +Question:+
        Fiware orion subscription with georel expression in condition

        +Description:+
        I have an entity in my orion DB:

        {
          "id"=>"User-121",
          "type"=>"User",
          "location"=>{
            "type"=>"geo:point",
            "value"=>"59.851484, 30.199463"
          },
          "time"=>{"type"=>"none", "value"=>222909, "metadata"=>{}}
        }


        Also, I have 3 subscriptions to this entity, which have the same coordinates in condition's expression:


          
          Should trigger when the entity is located, at least 100 meters far away from the reference point.
          


        {
          "id"=>"...",
          "expires"=>"...",
          "status"=>"active",
          "subject"=>{
            "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
            "condition"=>{
              "attributes"=>["location", "time"],
              "expression"=>{
                "q"=>"",
                "geometry"=>"point",
                "coords"=>"59.851484, 30.199463",
                "georel"=>"near;minDistance:100"}
            }
          },
          "notification"=>{
            "callback"=>"http://callback",
            "attributes"=>["time"]
          }
        }



          
          Should trigger when the entity is located, at a maximum, 100 meters far away from the reference point
          


        {
          "id"=>"...",
          "expires"=>"...",
          "status"=>"active",
          "subject"=>{
            "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
            "condition"=>{
              "attributes"=>["location", "time"],
              "expression"=>{
                "q"=>"",
                "geometry"=>"point",
                "coords"=>"59.851484, 30.199463",
                "georel"=>"near;maxDistance:100"}
            }
          },
          "notification"=>{
            "callback"=>"http://callback",
            "attributes"=>["time"]
          }
        },



          
          Should trigger when the entity is located at the reference point (has the same coordinates)
          


        {
          "id"=>"...",
          "expires"=>"...",
          "status"=>"active",
          "subject"=>{
            "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
            "condition"=>{
              "attributes"=>["location", "time"],
              "expression"=>{
                "q"=>"",
                "geometry"=>"point",
                "coords"=>"59.851484, 30.199463",
                "georel"=>"equals"}
            }
          },
          "notification"=>{
            "callback"=>"http://callback",
            "attributes"=>["time"]
          }
        }


        The problem is that all of the subscriptions send notifications each time I update the entity. It doesn't even depend on the entity's coordinates values. Whatever the coordinates are, I always receive 3 notifications of any update.

        What am I doing wrong ?
        Created question in FIWARE Q/A platform on 17-03-2016 at 16:03
        {color: red}Please, ANSWER this question AT{color} http://stackoverflow.com/questions/36064565/fiware-orion-subscription-with-georel-expression-in-condition


        +Question:+
        Fiware orion subscription with georel expression in condition

        +Description:+
        I have an entity in my orion DB:

        {
          "id"=>"User-121",
          "type"=>"User",
          "location"=>{
            "type"=>"geo:point",
            "value"=>"59.851484, 30.199463"
          },
          "time"=>{"type"=>"none", "value"=>222909, "metadata"=>{}}
        }


        Also, I have 3 subscriptions to this entity, which have the same coordinates in condition's expression:


          
          Should trigger when the entity is located, at least 100 meters far away from the reference point.
          


        {
          "id"=>"...",
          "expires"=>"...",
          "status"=>"active",
          "subject"=>{
            "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
            "condition"=>{
              "attributes"=>["location", "time"],
              "expression"=>{
                "q"=>"",
                "geometry"=>"point",
                "coords"=>"59.851484, 30.199463",
                "georel"=>"near;minDistance:100"}
            }
          },
          "notification"=>{
            "callback"=>"http://callback",
            "attributes"=>["time"]
          }
        }



          
          Should trigger when the entity is located, at a maximum, 100 meters far away from the reference point
          


        {
          "id"=>"...",
          "expires"=>"...",
          "status"=>"active",
          "subject"=>{
            "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
            "condition"=>{
              "attributes"=>["location", "time"],
              "expression"=>{
                "q"=>"",
                "geometry"=>"point",
                "coords"=>"59.851484, 30.199463",
                "georel"=>"near;maxDistance:100"}
            }
          },
          "notification"=>{
            "callback"=>"http://callback",
            "attributes"=>["time"]
          }
        },



          
          Should trigger when the entity is located at the reference point (has the same coordinates)
          


        {
          "id"=>"...",
          "expires"=>"...",
          "status"=>"active",
          "subject"=>{
            "entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}],
            "condition"=>{
              "attributes"=>["location", "time"],
              "expression"=>{
                "q"=>"",
                "geometry"=>"point",
                "coords"=>"59.851484, 30.199463",
                "georel"=>"equals"}
            }
          },
          "notification"=>{
            "callback"=>"http://callback",
            "attributes"=>["time"]
          }
        }


        The problem is that all of the subscriptions send notifications each time I update the entity. It doesn't even depend on the entity's coordinates values. Whatever the coordinates are, I always receive 3 notifications of any update.

        What am I doing wrong ?
        HD-Enabler Orion [ 10875 ]
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] Fiware orion subscription with georel expression in condition FIWARE.Question.Tech.Fiware orion subscription with georel expression in condition
        fermin Fermín Galán made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fermin Fermín Galán made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        fermin Fermín Galán made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        mev Manuel Escriche made changes -
        Assignee Fermín Galán [ fermin ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-03-17 18:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-03-17 18:05|CREATED monitor | # answers= 0, accepted answer= False
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: