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

FIWARE.Question.Tech.Orion Context Provider query multiple entities.

    Details

      Description

      Created question in FIWARE Q/A platform on 13-05-2021 at 13:05
      Please, ANSWER this question AT https://stackoverflow.com/questions/67520066/orion-context-provider-query-multiple-entities

      Question:
      Orion Context Provider query multiple entities

      Description:
      Tax information system contains all Tax information regarding every citizen in the city.
      Following FIWARE principles, seems it might make sense Consumers query Orion about entity(citizen) tax information, and the request being forwarded to Context Provider (ie:TaxInformationSystem).
      Query citizen X tax information -> Orion -> TaxInformationSystem_CP
      According to documentation, Context Providers can register themselves as source for specific attributes. This, for example, could make this work:
      http://orion/v2/entities/urn:citizenID/attrs/name/tax
      However, this seems to require every citizen to be registered as an entity, so tax information system should register multiple times (one per citizen). (And residenceInformationSystem, and healthInformationSystem, and...)
      "entities": [

      { "id" : "citizenID", //one per citizen ??? "type": "taxInformation" }

      ],

      and that seems, at least, a lot of unnecessary/superfluous work.
      After reading a bit more, seems any workaround is not yet implemented/supported

      Seems I can't use query parameters http://orion/v2/entities/tax?citizen=X, as they aren't forwarded to CP
      Seems I can't query any citizen tax http://orion/v2/entities/X/tax if the entity hasn't be explicitly created first
      Seems I can't set idPattern (currently only .* supported) to citizen:X
      Neither typePattern

      (IIUC, isPattern seems now deprecated in favour of idPattern/typePattern)

      Am I doing something wrong? Is registering once per citizen the only way to go?

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2021-05-14 05:31|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-05-14 05:31|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-05-15 05:31|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-05-15 05:31|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-05-16 05:31|UPDATED status: transition Answered| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-05-16 05:31|UPDATED status: transition Answered| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2021-05-20 05:31|UPDATED status: transition Finish| # answers= 2, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2021-05-20 05:31|UPDATED status: transition Finish| # answers= 2, accepted answer= True

          People

          • Assignee:
            mapedraza Miguel Ángel Pedraza
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: