-
Notifications
You must be signed in to change notification settings - Fork 88
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
Previous expression results are not available at context for the subsequents expressions #1493
Comments
Tests added here: #1490 |
I understand the typical case for nested expression is something like this:
so I understand something in the IOTA logic has to calculate attribute dependencies and evaluate attribute functions in the right order (in this case, first attrA funciton, next attrB function). |
Moreover, we could (in theory) things like this:
or even:
I understand that IOTA should detect this situations (at group/device provision time?) and raise an "cyclical dependency" error or something like that. |
PR #1491 But not sure if the above PR addresses the comments I have just posted. Let's keep the issue open while we can clarify that. |
IOTA Logic loops over active attributes. In case of "cyclical dependency", it should act as provisioned. IE: Initial Values:
Provision (expressions):
Final values
Note that provision order matters |
Good point :) Thus, the responsibility of expression evaluation order is put on the shoulders of the users. Good enough, but it should be properly documented. I'd suggest to include such documentation in PR #1490 (expanding the scope from test to test+doc). |
Done at #1491 |
IoT Agent Node Lib version the issue has been seen with
3.4.4 (master)
Bound or port used (API interaction)
Northbound (Provision API and NGSI Interactions)
NGSI version
NGSIv2
Are you running a container?
No, I am running it natively
Image type
None
Expected behaviour you didn't see
It is not possible to nest attributes using values from previous expressions. I.E:
Would not calculate
postfix attribute
The text was updated successfully, but these errors were encountered: