Craig Patrick created NIFI-14936:
------------------------------------
Summary: Multiple Issues when using Reference Parameters for
Services in Processors
Key: NIFI-14936
URL: https://issues.apache.org/jira/browse/NIFI-14936
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Affects Versions: 2.0.0
Environment: All
Reporter: Craig Patrick
Attachments: image-2025-09-03-16-49-03-524.png,
image-2025-09-03-16-49-37-547.png, image-2025-09-03-16-51-08-828.png,
image-2025-09-03-16-58-58-424.png, image-2025-09-03-16-59-48-134.png
I'm currently coming across a number of issues when trying to use Reference
Parameters for services in processors. I'm not sure how wide this is, but for
this specific use case it's definitely an issue.
Use case:
*InvokeHTTP processor which should use an SSL context in Production, but not in
a local environment.*
Steps to re-produce:
# Create a StandardRestrictedSSLContextService and configure accordingly so it
works
# Create a reference parameter in a parameter context which has the ID of this
created service
# Create an InvokeHTTP processor, and set the SSL Context to "Reference
Parameter..." and select the parameter you created earlier which has the ID of
the service
!image-2025-09-03-16-49-03-524.png!
!image-2025-09-03-16-49-37-547.png!
*Issue #1:*
You can not set the reference to "Empty String" in the parameter context:
!image-2025-09-03-16-51-08-828.png!
you CAN set the reference to empty by simply not typing anything in though, and
this allows you to apply those changes:
!image-2025-09-03-16-58-58-424.png!
and the resulting process works as I expect it should - HOWEVER...
*Issue #2:*
this then results in the "null pointer exception" when trying to commit changes
to a registry when it checks the processors:
!image-2025-09-03-16-59-48-134.png!
Unless I'm missing something with how reference parameters are supposed to
work, then I think this is not as intended. For clarity, I have this exact set
up, so I reference an SSL service in my QA environment and this works perfectly
- allowing https connections in that environment, and then locally I have
simply removed the ID to the SSL service and this works perfectly allowing non
https connections to my local docker container so in essence the
"functionality" is working - it's just that removing the reference to the ID
breaks committing ANYTHING that uses the same parameter context to the registry
(regardless of processor group) rendering it useless and then not being able to
allow empty is also an issue.
As a side workaround, if I remove the context from the processor group, I am
able to commit it to the registry without issue, then update it in say QA - and
then re-assign the parameter context - but that is a hacky workaround for a
system that shouldn't require it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)