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/taxif the entity hasn't be explicitly created first - Seems I can't set idPattern (currently only .* supported), as it would return all citizens tax, as Broker is not forwarding requests filters neither entity to CP
- 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?