-
Notifications
You must be signed in to change notification settings - Fork 639
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
I can access a nested property of a variable by using a dynamic path #11293
Comments
Your main proposal doesn't use the path variable. Either the transformation needs to happen in the FEEL function, or the user must perform it explicitly. IMO, the implicit path transformation is easier to use. Are there any downsides to us performing this transformation implicitly? |
Yes. In the example, I unwrapped the variable
With the given variables:
I updated the description. 👍
The option of using a list of keys is more aligned with the DMN spec. There is already an existing function The implicit conversion of |
12103: deps: dump feel-engine from 1.15.3 to 1.16.0 r=korthout a=saig0 ## Description Dump feel-engine from 1.15.3 to [1.16.0](https://github.com/camunda/feel-scala/releases/tag/1.16.0). ## Related issues Support-related issues: - camunda/feel-scala#508 for [SUPPORT-14012](https://jira.camunda.com/browse/SUPPORT-14012) - #11293 for [SUPPORT-15389](https://jira.camunda.com/browse/SUPPORT-15389) Closes #11293 Co-authored-by: Philipp Ossler <[email protected]>
12103: deps: dump feel-engine from 1.15.3 to 1.16.0 r=saig0 a=saig0 ## Description Dump feel-engine from 1.15.3 to [1.16.0](https://github.com/camunda/feel-scala/releases/tag/1.16.0). ## Related issues Support-related issues: - camunda/feel-scala#508 for [SUPPORT-14012](https://jira.camunda.com/browse/SUPPORT-14012) - #11293 for [SUPPORT-15389](https://jira.camunda.com/browse/SUPPORT-15389) Closes #11293 Co-authored-by: Philipp Ossler <[email protected]>
Is your feature request related to a problem? Please describe.
My process has the following variables:
I want to access the nested property
y.z
of the variablex
in a FEEL expression, for example, on an exclusive gateway.Instead of using static access
x.y.z
, I want to use the other variablepath
to define the access dynamically.Describe the solution you'd like
I can access the (nested) property of a variable by defining a variable as the path.
In FEEL, there is the function get value() that accesses a value of a context by a given key. We could extend the function to accept not only a single key but a list of keys. The list of keys is interpreted as the path.
An alternative to the list
["y", "z"]
would a string"y.z"
. But this option is not preferred because it would require an implicit transformation of the string into a path with the partsy
andz
.Describe alternatives you've considered
I access the (nested) property of a variable by using the static name
x.y.z
.Additional context
Related support case: https://jira.camunda.com/browse/SUPPORT-15389
The text was updated successfully, but these errors were encountered: