Hello,
The issue appears to be that you're using `${${REST_URL}:endsWith`
at the beginning, which is saying "resolve the value of the REST_URL variable,
then use that as the name of a variable."
So it's looking for a variable named "http://localhost:8080/nifi-api" and never
finds it. So endsWith() evaluates to `false`
in all cases.
What you want is instead:
${REST_URL:endsWith('/'):ifElse('${REST_URL}resources','${REST_URL}/resources')}
I.e., check if the value of the REST_URL variable ends with a slash...
Thanks
-Mark
On Jan 31, 2019, at 4:42 PM, l vic
<[email protected]<mailto:[email protected]>> wrote:
I am using processor group variable as base part of my URL:
REST_URL=http://localhost:8080/nifi-api
I am trying to append second part of URL in InvokeHTTP regardless if REST_URL
ends with '/', or not so that concatenation of
"http://localhost:8080/nifi-api/", or "http://localhost:8080/nifi-api" with
"resources" return the same URL: "http://localhost:8080/nifi-api/resources":
${${REST_URL}:endsWith('/'):ifElse('${REST_URL}resources','${REST_URL}/resources')}
But the expression always appends '/', so in the first case I end up with
"http://localhost:8080/nifi-api//resources"... Any idea where the error is?
Thank you,