Created 08-03-2023 05:44 AM
Hi,
We have a solution in our flow which is currently running on 1.16.3 and we are referencing parameters dynamically for some schema validations. Now we have upgraded NIFI to version 1.21.0 and this functionality of function "evaluateELString()" not working as expected. Example -
Using above NIFI expression language, we used to reference parameters dynamically but now we are getting null values although parameter is not sensitive.
I find out this was changed in NIFI version 1.19.0 to not expose sensitive parameters but why have they change it for all the parameters - NIFI-10674
I can see a JIRA raised for similar issue here - NIFI-11627
Can someone please help us over here ? I do not want to hardcode this thing as we have 10's of schemas in parameters and I do not want to hardcode for each one.
Created 08-07-2023 06:51 AM
@sam_s0ni I took up this conversation internally and exposed another related JIRA 11763.
This behavior was removed in 1.19 and will not be coming back due to nature of parameter evaluation against references of those parameters when they are changed.
You can view the conversation for NIFI-11763 here:
https://issues.apache.org/jira/browse/NIFI-11763
Created 08-07-2023 11:10 AM
@sam_s0ni
Apache NiFi never intended with the context of the NiFi framework to allow parameters to be dynamically accessed within NiFi Expression Language (NEL). The EvaluateElString() exposed a bug in which this was possible while never intended. That bug was addressed in apache NiFi 1.19 thus resulting in what you are seeing.
As an alternative, you could store your schemas in an external database and pull those schemas back dynamically based on a FlowFile attribute instead of using Parameter contexts to store those schemas.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 08-03-2023 06:17 AM
Created 08-07-2023 11:10 AM
@sam_s0ni
Apache NiFi never intended with the context of the NiFi framework to allow parameters to be dynamically accessed within NiFi Expression Language (NEL). The EvaluateElString() exposed a bug in which this was possible while never intended. That bug was addressed in apache NiFi 1.19 thus resulting in what you are seeing.
As an alternative, you could store your schemas in an external database and pull those schemas back dynamically based on a FlowFile attribute instead of using Parameter contexts to store those schemas.
If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.
Thank you,
Matt
Created 08-07-2023 06:51 AM
@sam_s0ni I took up this conversation internally and exposed another related JIRA 11763.
This behavior was removed in 1.19 and will not be coming back due to nature of parameter evaluation against references of those parameters when they are changed.
You can view the conversation for NIFI-11763 here:
https://issues.apache.org/jira/browse/NIFI-11763