You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "mtien-apache (via GitHub)" <gi...@apache.org> on 2023/04/04 01:09:32 UTC

[GitHub] [nifi] mtien-apache opened a new pull request, #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

mtien-apache opened a new pull request, #7117:
URL: https://github.com/apache/nifi/pull/7117

   !-- Licensed to the Apache Software Foundation (ASF) under one or more -->
   <!-- contributor license agreements.  See the NOTICE file distributed with -->
   <!-- this work for additional information regarding copyright ownership. -->
   <!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
   <!-- (the "License"); you may not use this file except in compliance with -->
   <!-- the License.  You may obtain a copy of the License at -->
   <!--     http://www.apache.org/licenses/LICENSE-2.0 -->
   <!-- Unless required by applicable law or agreed to in writing, software -->
   <!-- distributed under the License is distributed on an "AS IS" BASIS, -->
   <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
   <!-- See the License for the specific language governing permissions and -->
   <!-- limitations under the License. -->
   
   # Summary
   
   [NIFI-11287](https://issues.apache.org/jira/browse/NIFI-11287) (UI)
   To test:
   - add the Compress Content processor to the canvas
   - for property "Mode", select between "compress" and "decompress". You should see the "Compress Level" dependent property show and hide
   - create and add a parameter context with a parameter that has a value of "decompress" 
   - back in the processor configurations, configure the "Mode" property with the new parameter. The "Compress Level" property should hide. 
   
   # Tracking
   
   Please complete the following tracking steps prior to pull request creation.
   
   ### Issue Tracking
   
   - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
   
   ### Pull Request Tracking
   
   - [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
   - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
   
   ### Pull Request Formatting
   
   - [x] Pull Request based on current revision of the `main` branch
   - [ ] Pull Request refers to a feature branch with one commit containing changes
   
   # Verification
   
   Please indicate the verification steps performed prior to pull request creation.
   
   ### Build
   
   - [ ] Build completed using `mvn clean install -P contrib-check`
     - [x] JDK 11
     - [ ] JDK 17
   
   ### Licensing
   
   - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
   - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
   
   ### Documentation
   
   - [ ] Documentation formatting appears as expected in rendered files
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on PR #7117:
URL: https://github.com/apache/nifi/pull/7117#issuecomment-1498006364

   Thanks for reviewing, @exceptionfactory! I fixed the syntax errors and addressed your comments. Would you look again? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on PR #7117:
URL: https://github.com/apache/nifi/pull/7117#issuecomment-1533807206

   I changed the way `jqeury.propertytable` retrieves the parameter context when calling `loadProperties`. Instead of a deferred, `loadProperties` will now check for a new parameter, `type`, and if it's a `processor-configuration` or `controller-service`, then it will make an ajax request to get the parameter context. 
   
   @exceptionfactory can you check again? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mcgilman merged pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman merged PR #7117:
URL: https://github.com/apache/nifi/pull/7117


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mcgilman commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1185464464


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -1931,13 +1948,20 @@
                                 if (property.hidden === false) {
                                     // Get the property value by propertyName
                                     var propertyValue = properties[dependency.propertyName];
+                                    referencingParameter = null;
+
+                                    // check if the property references a parameter
+                                    if (!_.isEmpty(currentParameterContext)) {

Review Comment:
   I believe we already have a `getParameterContext` callback in the original `options` with the Property Table to support actions like Convert to Parameter. We should be able to simply invoke that callback above, within this event, to get the parameter context if applicable. The callback will not be set when it's not applicable. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1189194682


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2021,43 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {
+        var parameters = _.get(parameterContext.component, 'parameters', []);
+        var existingParametersReferenced = [];
+
+        if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+            // can't use from common/constants because we are modifying the lastIndex below
+            var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   @mcgilman Good point. I changed the pattern for these cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mcgilman commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1185469991


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2026,44 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference}
+     *
+     * @param {string} parameterReference
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference) {

Review Comment:
   It also looks like the Property Table already has a `containsParameterReference` function. Can this be consolidated at all? I see that one is simply detecting while the other is extracting the Parameter Reference. If there's no opportunity for reuse that's ok. Just wanted to raise awareness here in case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mcgilman commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1188922103


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2021,43 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {
+        var parameters = _.get(parameterContext.component, 'parameters', []);
+        var existingParametersReferenced = [];
+
+        if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+            // can't use from common/constants because we are modifying the lastIndex below
+            var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   I think this capturing group was to ensure that:
   
   - if there was a starting quote then there was also an ending quote
   - if there was no starting quote then there was also no ending quote
   - and to not match when there was one but not the other



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1173195571


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2020,45 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {

Review Comment:
   @exceptionfactory I've simplified the function by removing the `sensitive` and `parameterContext` parameters.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1190085525


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2021,43 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {
+        var parameters = _.get(parameterContext.component, 'parameters', []);
+        var existingParametersReferenced = [];
+
+        if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+            // can't use from common/constants because we are modifying the lastIndex below
+            var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   Thanks for noting that background @mcgilman, that makes sense, and thanks for making the changes @mtien-apache.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1164840506


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2020,45 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {

Review Comment:
   Is there a reason for passing `parameterContext` and `sensitive` as arguments? It looks like `sensitive` is always `false` and `parameterContext` always references `currentParameterContext`. Unless there is some other reason to keep them, it seems like the implementation could be simplified.



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2261,9 +2319,32 @@
          * @argument {object} properties        The properties
          * @argument {map} descriptors          The property descriptors (property name -> property descriptor)
          * @argument {map} history
+         * @argument {object} options
          */
-        loadProperties: function (properties, descriptors, history) {
-            return this.each(function () {
+        loadProperties: function (properties, descriptors, history, options) {
+            var self = this;
+            var groupId = null;
+
+            var loadParameterContext = function (options) {
+                if (typeof options.getFullParameterContextDeferred === 'function') {

Review Comment:
   Is there a particular reason for passing `getFullParameterContextDeferred` and `getParameterContext` as properties of the `options` argument? Could they be passed as specific arguments instead of properties of `options`? If there is some other reason, recommend at least providing additional comments for the `options` argument.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mcgilman commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mcgilman (via GitHub)" <gi...@apache.org>.
mcgilman commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1185469991


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2026,44 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference}
+     *
+     * @param {string} parameterReference
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference) {

Review Comment:
   It also looks like the Property Table already has a `containsParameterReference` function. Can it be used instead? I see that one is simply detecting while the other is extracting the Parameter Reference. If there's no opportunity for reuse that's ok. Just wanted to raise awareness here in case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1187988754


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -1931,13 +1948,20 @@
                                 if (property.hidden === false) {
                                     // Get the property value by propertyName
                                     var propertyValue = properties[dependency.propertyName];
+                                    referencingParameter = null;
+
+                                    // check if the property references a parameter
+                                    if (!_.isEmpty(currentParameterContext)) {

Review Comment:
   @mcgilman Thanks for reviewing! I removed the `type` parameters and updated to use the provided callbacks from the client when calling `loadProperties`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1173203769


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2261,9 +2319,32 @@
          * @argument {object} properties        The properties
          * @argument {map} descriptors          The property descriptors (property name -> property descriptor)
          * @argument {map} history
+         * @argument {object} options
          */
-        loadProperties: function (properties, descriptors, history) {
-            return this.each(function () {
+        loadProperties: function (properties, descriptors, history, options) {
+            var self = this;
+            var groupId = null;
+
+            var loadParameterContext = function (options) {
+                if (typeof options.getFullParameterContextDeferred === 'function') {

Review Comment:
   @exceptionfactory I added additional comments for the `options` argument. The `options` would only be necessary when `loadProperties` is called from processor configurations because it requires access to a parameter context in order to reference parameters. `loadProperties` can be called from other parts of NiFi, such as the Controller Service or Reporting Task that don't require additional options. In order to know this was called from processor configs, we can check for the parameter context options.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] exceptionfactory commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1157337337


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2021,43 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {
+        var parameters = _.get(parameterContext.component, 'parameters', []);
+        var existingParametersReferenced = [];
+
+        if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+            // can't use from common/constants because we are modifying the lastIndex below
+            var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   Is it necessary to define a capturing group for the `'` character? It seems like the pattern could be adjusted to use a single capturing group:
   ```suggestion
               var paramRefsRegex = /#{'?([a-zA-Z0-9-_. ]+)'?}/gm;
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nifi] mtien-apache commented on a diff in pull request #7117: NIFI-11287: detect dependent properties when the property it depends on references a parameter (UI)

Posted by "mtien-apache (via GitHub)" <gi...@apache.org>.
mtien-apache commented on code in PR #7117:
URL: https://github.com/apache/nifi/pull/7117#discussion_r1158927643


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/propertytable/jquery.propertytable.js:
##########
@@ -2001,6 +2021,43 @@
         propertyData.setItems([]);
     };
 
+    /**
+     * Gets all the referenced parameters from the {parameterContext} based on the value of {parameterReference} with matching {sensitive} property
+     *
+     * @param {string} parameterReference
+     * @param {ParameterContextEntity} parameterContext
+     * @param {boolean} sensitive
+     * @returns {ParameterEntity[]}
+     */
+    var getExistingParametersReferenced = function (parameterReference, parameterContext, sensitive) {
+        var parameters = _.get(parameterContext.component, 'parameters', []);
+        var existingParametersReferenced = [];
+
+        if (!_.isNil(parameterReference) && !_.isEmpty(parameters)) {
+            // can't use from common/constants because we are modifying the lastIndex below
+            var paramRefsRegex = /#{(')?([a-zA-Z0-9-_. ]+)\1}/gm;

Review Comment:
   @exceptionfactory It's not necessary to define a separate capturing group for `'`. I updated this block of code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org