You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Alec Wenzowski (JIRA)" <ji...@apache.org> on 2016/11/30 21:34:58 UTC

[jira] [Comment Edited] (NIFI-3125) Cannot access custom properties from expression language

    [ https://issues.apache.org/jira/browse/NIFI-3125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709519#comment-15709519 ] 

Alec Wenzowski edited comment on NIFI-3125 at 11/30/16 9:34 PM:
----------------------------------------------------------------

[~joewitt] Yes, I'd missed that and now see the note in the UI when mousing over the question mark. I agree with both point 1 and 2. On the subject of 2, would like to update InvokeHTTP as well: each of my flows needs to be run on a list of credentials. Is it possible the field restrictions made it difficult to add EL support to these properties? Shall we split those two points into separate issues?

Given the above, I tried adding the $\{nifi.service.api_key\} expression to the Remote URL property instead. The expression still appears to be evaluated as if the key has not been set: the expression is stripped from the url and no value is interpolated. I am using another expression in this field which is conditionally added to the flow by EvaluateJSONPath like so `http://example.com?offset=$\{query.offset\}` and which is behaving as expected.


was (Author: wenzowski):
[~joewitt] Yes, I'd missed that and now see the note in the UI when mousing over the question mark. I agree with both point 1 and 2. On the subject of 2, would like to update InvokeHTTP as well: each of my flows needs to be run on a list of credentials. Is it possible the field restrictions made it difficult to add EL support to these properties? Shall we split those two points into separate issues?

Given the above, I tried adding the $\{nifi.service.api_key\} expression to the Remote URL property instead. The expression still appears to be evaluated as if the key has not been set: the expression is stripped from the url and no value is interpolated. I am using another expression in this field which is conditionally added to the flow by EvaluateJSONPath like so `http://example.com?offset=${query.offset}` and which is behaving as expected.

> Cannot access custom properties from expression language
> --------------------------------------------------------
>
>                 Key: NIFI-3125
>                 URL: https://issues.apache.org/jira/browse/NIFI-3125
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.1.0
>         Environment: $ sw_vers
> ProductName:	Mac OS X
> ProductVersion:	10.12.1
> BuildVersion:	16B2555
> $ java -version
> java version "1.8.0_112"
> Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
> Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)
>            Reporter: Alec Wenzowski
>
> Given a variable registry property file has been configured
> {code:title=conf/nifi.properties|borderStyle=solid}
> nifi.variable.registry.properties=./conf/service.properties
> {code}
> And it contains one valid key
> {code:title=conf/service.properties|borderStyle=solid}
> nifi.service.api_key=pony_foo
> {code}
> Upon booting nifi and inspecting I see
> {code:title=logs/nifi-app.log|borderStyle=solid}
> 745:2016-11-29 19:12:47,020 INFO [main] o.a.nifi.util.FileBasedVariableRegistry Loaded 1 properties from './conf/service.properties'
> {code}
> Yet when I configure a {{GetHTTP}} processor with its Username property set to the Value $\{nifi.service.api_key\} it issues HTTP requests without authentication–the configured HTTP Basic Authentication username of `pony_foo` is not used–and behaves as if the $\{nifi.service.api_key\} value has not been set.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)