-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JEXL. Include attribute metadata in evaluation context #4594
Comments
The built-in attributes in https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#builtin-metadata could be included in the context:
In fact, adding |
For me 1) since JEXL provides great built in features to access JSON/Object data information and filtering. |
After a brief internal discussion, let's go for alternative 1 |
Did you consider to use a "less usual name", like |
Maybe, but the syntax is more "dirty"... Is any actual probability that some insane user :) names an attribute with the name |
PR #4600 |
Is your feature request related to a problem / use case? Please describe.
Adding attribute metadata context will enhance CB JEXL notification features. For instance, we could define a new attribute which value is the one in some metadata.
Describe the solution you'd like
Include attribute metadata in evaluation context at JEXL context building time.
Describe alternatives you've considered
Considering the following entity:
Alternative 1: use a
metadata
object, which keys would be attribute names. So evaluation context will be:Alternative 2: don't use an object, but a "flatten" of context identifiers, this way:
In both case, name collision could occur (i.e. new object
metadata
could collide if some attribute is namedmetatata
in alterative 1 and the same with attributes named eg.A__metadata__MD1
) but this would be very weird and an anti-pattern.Describe why you need this feature
The text was updated successfully, but these errors were encountered: